plaid-python icon indicating copy to clipboard operation
plaid-python copied to clipboard

Async Support

Open autoferrit opened this issue 9 years ago • 4 comments

I will be using this for a personal project using async. As it stands currently, it does not support async at all. I managed a hack to get it to work for the time being, but it is sort of ugly using a hacky check and whatnot.

I would like to add proper async support, using with https://github.com/aio-libs/aiohttp . But as this will be a big change, I want to see up front whether or not this kind of change (PR) would be accepted here, or if I should make my own library separate.

The reason this would require a lot of changes is because the I/O is coupled to every class that makes a call to the plaid API. To make it properly support both synchronous and async methods, the I/O needs to be removed and passed in as a parameter (though, defaulting the the default non async class). So a handful of changes need to be done.

I would like to contribute back and make this available here for every one to use. But I want to make sure it is something that will be accepted. Due to the nature of the change. I am fine maintaining my own version, mind you. I just thought I would try here directly first and to get your thoughts.

autoferrit avatar Sep 28 '17 07:09 autoferrit

@autoferrit I ran into this issue as well and forked the repo to add async support --https://github.com/annielcook/aio-plaid-python -- my implementation isn't backwards compatible with the synchronous version and I was wondering if you were able to get that to work and if so, where is that repo?

annielcook avatar Jan 21 '20 17:01 annielcook

I had it partially written but ended up stopping it due to client changes. But my main change was to separate all the I/O from the main operations. That way only the I/O part needs async support, and it wasn't too hard to make it support both. I will check yours out.

autoferrit avatar Jan 23 '20 05:01 autoferrit

Hello! So as of right now, we're working on a new generated library that will be compliant with our soon-released OpenAPI spec, and released early next year. If you check out the default output for Python of the generator we're using, it has async requests built-into the output code. You can also check out plaid-python beta's generated internals (for beta we're wrapping around the generated code) to see the async support.

So would not recommend opening a PR as we will be pushing a major update soon.

stephenjayakar avatar Nov 10 '20 22:11 stephenjayakar

Any updates on adding 'async' support?

vladislavkoz avatar Apr 20 '26 07:04 vladislavkoz