twilio-python
twilio-python copied to clipboard
Add Support for Python 3 async calls
Please add posibility to send async requests. Right now your library block my event loop
There are ways to make synchronous calls asynchronous. Async and synchronous functions in python aren't interchangeable from what I understand - making this library async-compatible would break it for the synchronous use case.
You just need to split http client from logic and add a possibility to replace the client into async client. You have a very tied architecture.
This issue has been added to our internal backlog to be prioritized. Pull requests and +1s on the issue summary will help it move up the backlog.
any news?
Until this is possible is it possible, in the mean time, to build URLs and read responses independently of emitting actual HTTP requests? I'm not familiar at all with the code (and not even with twilio that I only used for few hours) so I can't tell myself sorry. But if these two things are possible, maybe the best idea is to never emit HTTP request yourself and let that part to the user.
Maybe I'm wrong but I feel like this library is "just" a wrapper that build URL -> send HTTP -> parse the response? If that the case it should be very easy to transform synchronous calls to asynchronous calls (I guess there is a single place in the code that you should split in two, that's where the HTTP request is sent)?
Here?
Been a couple of years, any work still planned here?
Support for making async requests has been added and will be ready in the next release candidate.
#676