Skip to main content

standard-cache

Redis caching helpers and distributed locks for the standard Python library. The package name is standard-cache; Python imports are under std.cache.

Install the provider directly or select it through the standard[cache] extra. It shares the core distribution's release version:

python -m pip install standard-cache
from std.cache import RedisClient, RedisConfig, cached

cache = RedisClient(RedisConfig(host="localhost", key_prefix="shop:"))
await cache.connect()


@cached(cache, ttl=300)
async def get_product(product_id: int) -> dict[str, str]:
    return await load_product(product_id)


try:
    product = await get_product(42)
finally:
    await cache.close()

RedisClient supports JSON-compatible values, raw bytes, expiration, atomic conditions, key scanning, and prefix-aware deletion. cached and cache_aside preserve sync and async function behavior. DistributedLock and with_lock provide lease-based locks with token-checked release. See the cache guide for lifecycle, serialization, failure, and locking behavior.

Metadata

Release files for standard-cache 0.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for standard-cache 0.2.4
File Size Uploaded
standard_cache-0.2.4.tar.gz 9.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for standard-cache 0.2.4
File Interpreter ABI Platform
standard_cache-0.2.4-py3-none-any.whl Python 3 none any Details

Total release size: 21.0 kB

Release files / standard_cache-0.2.4.tar.gz

Download URL standard_cache-0.2.4.tar.gz
Size 9.5 kB
Tags Source
SHA-256 checksum
How to use checksums
aa83100a52152ce012b543a2b60559c63a3b12199bd51c180c551f82ed15ed29
BLAKE2b-256 checksum
How to use checksums
38f9fa7230a0a1e69554ef7b779c64bed3f57429aa47f3af95846e92c4758042
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.

Transparency log

Release files / standard_cache-0.2.4-py3-none-any.whl

Download URL standard_cache-0.2.4-py3-none-any.whl
Size 11.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
11598682cfef34564cc90c89b6cadfdd5608e1719124632cf7eec3451b170bf9
BLAKE2b-256 checksum
How to use checksums
34e2bf0a1433f38646eb6d8e8ece87098b0afccc2f5e1af7b07ba8cdcf3f7177
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.4 This release

2 release files

0.2.3

2 release files

0.2.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page