asyncio atexit
Adds atexit functionality to asyncio:
import asyncio_atexit
async def close_db():
await db_connection.close()
asyncio_atexit.register(close_db)
atexit is part of the standard library, and gives you a way to register functions to call when the interpreter exits.
asyncio doesn't have equivalent functionality to register functions when the event loop exits:
This package adds functionality that can be considered equivalent to atexit.register,
but tied to the event loop lifecycle. It:
- accepts both coroutines and synchronous functions
- should be called from a running event loop
- calls registered cleanup functions when the event loop closes
- only works if the application running the event loop calls
close()
Metadata
Release files for asyncio-atexit 1.0.1
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 |
|---|---|---|---|---|
| asyncio-atexit-1.0.1.tar.gz | 4.4 kB | Without provenance | Details for asyncio-atexit-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| asyncio_atexit-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for asyncio_atexit-1.0.1-py3-none-any.whl |
Total release size: 8.1 kB
Release files / asyncio-atexit-1.0.1.tar.gz
| Download URL | asyncio-atexit-1.0.1.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1d0c71544b8ee2c484d322844ee72c0875dde6f250c0ed5b6993592ab9f7d436
|
|
BLAKE2b-256 checksum How to use checksums |
22d3dd2974be3f67c7ec96e0d6ab454429d0372cb7c7bffa3d0ac67a483cb801
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.8.13
|
Release files / asyncio_atexit-1.0.1-py3-none-any.whl
| Download URL | asyncio_atexit-1.0.1-py3-none-any.whl |
|---|---|
| Size | 3.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d93d5f7d5633a534abd521ce2896ed0fbe8de170bb1e65ec871d1c20eac9d376
|
|
BLAKE2b-256 checksum How to use checksums |
6510d6abaefa57a52646651fd0383c056280b0853c0106229ece6bb38cd14463
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.8.13
|
Security for asyncio-atexit 1.0.1
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.