aio-executor
A concurrent.futures.Executor implementation that runs asynchronous tasks in an asyncio loop.
Example usage:
from aio_executor import AioExecutor
async def my_async_function(arg):
# ...
with AioExecutor() as aioexec:
# single invocation
f = aioexec.submit(my_async_function, 'foo')
result = f.result()
# multiple concurrent invocations using "map"
results = aioexec.map(my_async_function, ['foo', 'bar', 'baz'])
As a convenience, a run_with_asyncio decorator is also provided. This
decorator runs the decorated async function in a AioExecutor instance.
The example below shows how to implement an async view function for the Flask framework using this decorator:
@app.route('/')
@run_with_asyncio
async def index():
return await get_random_quote()
How to Install
pip install aio-executor
Metadata
Release files for aio-executor 0.2.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 | Actions |
|---|---|---|---|---|
| aio-executor-0.2.0.tar.gz | 2.6 kB | Without provenance | Details for aio-executor-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aio_executor-0.2.0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for aio_executor-0.2.0-py2.py3-none-any.whl |
Total release size: 6.1 kB
Release files / aio-executor-0.2.0.tar.gz
| Download URL | aio-executor-0.2.0.tar.gz |
|---|---|
| Size | 2.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e9b78a1355cd7beb55bdc367c94fcfe5e8bc188cc457e8e2ab1f4bf2666caf98
|
|
BLAKE2b-256 checksum How to use checksums |
efc2d4ebb9b4cae9bb5aaa71b17fc930250795cc98232d91464305cdc4f1b9cf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.0
|
Release files / aio_executor-0.2.0-py2.py3-none-any.whl
| Download URL | aio_executor-0.2.0-py2.py3-none-any.whl |
|---|---|
| Size | 3.5 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
06ddbd83f2056435a0e9aac83b9d1a7a6d74142bfdec456d03d28c4428a8fdf9
|
|
BLAKE2b-256 checksum How to use checksums |
f91bcab73482f931a4d73bba8d85fda6bd0e067801b0db2fda152656f9315e28
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.0
|
Security for aio-executor 0.2.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.