Convert plain old functions to coroutines and vice versa
Project description
slp_coroutine - Use Plain Old Functions as Coroutines
Using Stackless Python tasklets it is possible to decorate any plain old Python callable as a C-Python coroutine, that can be used with the asyncio framework. It is also possible to "async" call a coroutine from a callable decorated as coroutine.
This Python module all sort of utility functions to
- create a coroutine from a callable
- call a coroutine from a callable
- create an asynchronous generator/iterator form a normal generator/iterator
- create a normal generator/iterator form an asynchronous normal generator/iterator
- create an asynchronous context manager from a normal context manager
- create a normal context manager from an asynchronous context manager
This code requires Stackless Python 3.7.6 or any later version.
Documentation: https://slp-coroutine.readthedocs.io/
Bug Tracker: https://github.com/akruis/slp_coroutine/issues
Changelog
- 0.0.1: Initial release
- 0.0.2: Add the documentation to the source archive
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
slp_coroutine-0.0.2.tar.gz
(21.8 kB
view details)
File details
Details for the file slp_coroutine-0.0.2.tar.gz.
File metadata
- Download URL: slp_coroutine-0.0.2.tar.gz
- Upload date:
- Size: 21.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
80e72ecfdc8af9a9a57f8ead04427d50fe5f91120c752c1b6c0ae761f6377456
|
|
| MD5 |
317a355767180bf5a13b83dafbe7dc10
|
|
| BLAKE2b-256 |
8faaf53b24cdcfc10be3db3679ceacdd70df15ddc1b9d81218dfcffdcb6a6f2c
|