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

Add Support for Python 3 async calls

Open Crandel opened this issue 6 years ago • 6 comments

Please add posibility to send async requests. Right now your library block my event loop

Crandel avatar May 17 '18 11:05 Crandel

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.

tstirrat15 avatar Jun 18 '18 23:06 tstirrat15

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.

Crandel avatar Jun 19 '18 06:06 Crandel

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.

childish-sambino avatar Nov 27 '19 20:11 childish-sambino

any news?

muzhig avatar Apr 10 '20 14:04 muzhig

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?

cglacet avatar Jun 19 '20 16:06 cglacet

Been a couple of years, any work still planned here?

skrivanos avatar Sep 25 '22 07:09 skrivanos

Support for making async requests has been added and will be ready in the next release candidate.

#676

Hunga1 avatar Mar 15 '23 16:03 Hunga1