You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This would only be feasible if it leaves the existing behavior intact as synchronous calls. There are ways to write the code as async and have a wrapper that generates a synchronous version. This could potentially be refactored so that pyadctyl exposes get_servers() and async_get_servers() without impacting the existing behavior.
Hi, @iamkubi. I made a partially working version with asynchronous calls, and I have a couple of questions for you.
Firstly, what should the documentation look like for synchronous functions? Should it just copy-paste from asynchronous methods or refer to them or something else? The same question I have for tests: if synchronous versions will call asynchronous ones, then it is not necessary to test asynchronous ones directly, am I right?
Or how will synchronous calls work? You can call asynchronous in a new(or existing) loop/thread/etc. But you can just use the existing synchronous requests.Session(or httpx.Client) and don't bother with it. Also, is there no problem here if I use httpx library for asynchronous requests?
This would only be feasible if it leaves the existing behavior intact as synchronous calls. There are ways to write the code as async and have a wrapper that generates a synchronous version. This could potentially be refactored so that pyadctyl exposes
get_servers()
andasync_get_servers()
without impacting the existing behavior.Some relevant links
The text was updated successfully, but these errors were encountered: