Context manager for asyncio event loop.
Project description
- Info:
Context loop.
Features
Work with sync and async frameworks
Schedule tasks to existing loop or create new one
No need to understand how async works
No callbacks required
Run async tasks whenever and wherever you want
Installation
pip install context-loop
Documentation
Read full documentation at http://context-loop.readthedocs.io/en/stable/
Quick Example
>>> async def coro():
... return await something_from_future()
...
>>> import cl.Loop
>>> with cl.Loop(coro(), coro(), coro()) as loop:
... result = loop.run_until_complete()
...
>>> result
['success', 'success', 'success']
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
context-loop-0.1.1.tar.gz
(26.2 kB
view details)
File details
Details for the file context-loop-0.1.1.tar.gz
.
File metadata
- Download URL: context-loop-0.1.1.tar.gz
- Upload date:
- Size: 26.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab8e33bb900dcc045fde017cd00d148071df6afa26c4272ffc78a06a294eb9a3 |
|
MD5 | 6919da3411a68413ff1ad97c0aab2003 |
|
BLAKE2b-256 | 67ad6d19f8beb6b57204c46686544652a939db33dd3974638062ac34be120a04 |