py: async requests
Opened this issue · 1 comments
Right now the Python module is making synchronous requests only.
It would be interesting to provide a way to make asynchronous calls. Please see the Javascript client which supports both asynchronous and synchronous calls, using an optional callback.
As an example, the socketio Python module is available for both native standard Python library (synchronous) and asyncio package (asynchronous). This implementation could be followed as a guideline. The socket.io asyncio is being used in the Python socket client to listen to the server's event.
Here is the Socketio async Python client doc that could be used as an example for the implementation.
The goal here is to use the asyncio Python module to make damas.py support asynchronous requests.
This issue was addressed by @nobalove2000 in #259 and the code was not ready to be merged.
A nice implementation of the asyncio module is in the socketio, which exists using both sync methods using the requests module and async methods using the asyncio module.