asyncache
Helpers to use cachetools with asyncio.
Installation
asyncache is available from PyPI and can be installed by running:
pip install asyncache
Example
from asyncache import cached
from cachetools import TTLCache
pool = ...
@cached(TTLCache(1024, 60))
async def get_username(user_id):
rec = await pool.fetchrow(
"""
SELECT
username
FROM
users
WHERE
id = $1
""",
user_id,
)
return rec and rec["username"]
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
Metadata
Release files for asyncache 0.3.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 |
|---|---|---|---|---|
| asyncache-0.3.1.tar.gz | 3.8 kB | Without provenance | Details for asyncache-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| asyncache-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for asyncache-0.3.1-py3-none-any.whl |
Total release size: 7.5 kB
Release files / asyncache-0.3.1.tar.gz
| Download URL | asyncache-0.3.1.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9a1e60a75668e794657489bdea6540ee7e3259c483517b934670db7600bf5035
|
|
BLAKE2b-256 checksum How to use checksums |
49cf17f8a6b6b97f77b5981fbce1266913e718daaa3467b46f60a785cbaadc29
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.0b2 CPython/3.10.7 Darwin/21.6.0
|
Release files / asyncache-0.3.1-py3-none-any.whl
| Download URL | asyncache-0.3.1-py3-none-any.whl |
|---|---|
| Size | 3.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ef20a1024d265090dd1e0785c961cf98b9c32cc7d9478973dcf25ac1b80011f5
|
|
BLAKE2b-256 checksum How to use checksums |
2f9451927deb4f40872361ec4f5534f68f7a9ce81c4ef20bf5cd765307f4c15d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.0b2 CPython/3.10.7 Darwin/21.6.0
|
Security for asyncache 0.3.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.