-
Notifications
You must be signed in to change notification settings - Fork 98
Description
RIght now, the Python library client modules are all asynchronous. This is great for efficiency but can be troublesome for use cases that require synchronous frameworks.
The issue with adding synchronous support is that it introduces a lot of redundancy within the code base. This is worth it if there is enough need for synchronous support.
Many synchronous use cases can be addressed by wrapping asynchronous calls in a function that runs them in an event loop, e.g.
def sync_create_order():
return asyncio.run(create_order())
However, consider this excerpt from the asyncio.run documentation:
This function always creates a new event loop and closes it at the end. It should be used as a main entry point for asyncio programs, and should ideally only be called once.
As users, you can help us assess the need for this feature! Please comment with your use case if native synchronous support within the Python library is a need for you.