Make your async code sweeter.
Caution, this is a 0.x.y version, the public interfaces might break at any time.
A collection of simple functions, decorators and classes to make your asynchronous python code sweeter.
- remove the boilerplate that comes with setting up and using an event loop with the aiorunner context manager and the @sync decorator for async functions; they also clean up after an exception happens so you don’t get useless warnings about an unclosed event loop and the like
- easily communicate between coroutines or between coroutines and threads with the Channel and BufferedChannel classes; they can be used as async iterators from coroutines and blocking iterators from threads
- receive data from multiple channels with a Bundle by iterating on it
- dispatch events to callbacks and async functions with EventEmitter; it even handles backpressure and errors
- make your code sweeter with these small functions: aiter, asyncify, and as_await
- implement synchronization primitives with waiter (such as channels!)
See the example directory for runnable examples.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size & hash SHA256 hash help||File type||Python version||Upload date|
|sweetasync-0.7.0-py3-none-any.whl (10.1 kB) Copy SHA256 hash SHA256||Wheel||py3||Jun 28, 2018|
|sweetasync-0.7.0.tar.gz (9.3 kB) Copy SHA256 hash SHA256||Source||None||Jun 28, 2018|