I would like to show my new Python library: universalasync. It helps library maintainers to create only asynchronous version of their libs, and synchronous version will be created automatically, so that users could use it in their sync and async apps interchangeably.
For example, when running inside a sync function, you could call obj.method(), but when running inside an async function you could also call await obj.method()
So there is no need to create async_* variants of your functions, or use other methods of creating sync versions (for example in my another library some time ago I was just removing async and await and publishing this as a separate package).
The library has 0 dependencies of course, it wraps all public methods of a class to it's implementation. It basically does what you would have done if you needed to run a coroutine from your sync code, but automatically.
1 comment
[ 3.6 ms ] story [ 17.6 ms ] threadFor example, when running inside a sync function, you could call obj.method(), but when running inside an async function you could also call await obj.method()
So there is no need to create async_* variants of your functions, or use other methods of creating sync versions (for example in my another library some time ago I was just removing async and await and publishing this as a separate package).
The library has 0 dependencies of course, it wraps all public methods of a class to it's implementation. It basically does what you would have done if you needed to run a coroutine from your sync code, but automatically.
API reference can be found here: https://universalasync.bitcartcc.com/en/latest/api.html
Any feedback, testing and bugs found welcome!