greenletio
This project allows synchronous and asynchronous functions to be used together.
Unlike other methods based on executors and thread or process pools,
greenletio allows synchronous functions to work like their asynchronous
counterparts, without the need to create expensive threads or processes.
Examples
The following are some of the possibilities when using greenletio.
Convert a sync function into an awaitable
import asyncio
from greenletio import async_
@async_
def sync_function(arg):
pass
async def async_function():
await sync_function(42)
asyncio.run(async_function())
Use await inside a sync function
from greenletio import await_
async def async_function():
pass
def sync_function():
await_(async_function())
Call an async function as a normal function
from greenletio import await_
@await_
async def async_function():
pass
def sync_function():
async_function()
Resources
Metadata
Release files for greenletio 0.11.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| greenletio-0.11.0.tar.gz | 29.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| greenletio-0.11.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 44.6 kB
Release files / greenletio-0.11.0.tar.gz
| Download URL | greenletio-0.11.0.tar.gz |
|---|---|
| Size | 29.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5751773f859ee7c5a8745569af04b27532e2b8bdb170eb224193bebc32f38136
|
|
BLAKE2b-256 checksum How to use checksums |
7ebebab6b8bacbc0ed8089deb38bc6dc947a67f7ca5be009dd5bbf4333e1a782
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.0
|
Release files / greenletio-0.11.0-py3-none-any.whl
| Download URL | greenletio-0.11.0-py3-none-any.whl |
|---|---|
| Size | 15.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
314f6ac301aacca1c94f8d9ec9d509d98381643e7949cb33af9a14bfa0417b2e
|
|
BLAKE2b-256 checksum How to use checksums |
1913abbe5bf28eac052c17b6f1dbcd0daf5b6ce26e8f862ef6eacff636b7b77d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.0
|
Security for greenletio 0.11.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.