Skip to main content

slycache

PyPi version

Python versions

Build status

A caching API for python loosely modeled after the Java Caching API (JSR107).

Basic Usage

Start by registering a cache backend:

slycache.register_backend("default", my_cache_backend)

Define a key namespace:

# define a key namespace
user_cache = slycache.with_defaults(namespace="user")

Use the cache on methods and functions:

@user_cache.cache_result("{username}")
def get_user_by_username(username):
    ...

@user_cache.cache_result("{user_id}")
def get_user_by_id(user_id):
    ...

@user_cache.cache_put([
    "{user.username}", "{user.user_id}"
])
def save_user(user):
    ...

@user_cache.cache_remove([
    "{user.username}", "{user.user_id}"
])
def delete_user(user):
    ...

For more advanced usage see the documentation: https://snopoke.github.io/slycache/

Metadata

Release files for slycache 0.3.1

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

Source distribution (sdist)

Source distribution for slycache 0.3.1
File Size Uploaded Provenance Actions
slycache-0.3.1.tar.gz 53.8 kB Without provenance Details for slycache-0.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for slycache 0.3.1
File Interpreter ABI Platform Actions
slycache-0.3.1-py3-none-any.whl Python 3 none any Details for slycache-0.3.1-py3-none-any.whl

Total release size: 68.2 kB

Release files / slycache-0.3.1.tar.gz

Download URL slycache-0.3.1.tar.gz
Size 53.8 kB
Tags Source
SHA-256 checksum
How to use checksums
a3ddc6bc0179b54b74ec13f0676c465f3d639278d37e3906f8606b11e5384104
BLAKE2b-256 checksum
How to use checksums
f926531619f7551faace5257ab63b6d2a2ebc0b6cc6c5b7b7903abc09ef6f5e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.18

Release files / slycache-0.3.1-py3-none-any.whl

Download URL slycache-0.3.1-py3-none-any.whl
Size 14.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4175363f1640e46636026753884d539304b17f7d5bf0b7e3620156a5d442e3c9
BLAKE2b-256 checksum
How to use checksums
8027cf2a5d1aaeb81ec984ae492b44d8f5b82ca2361d3b1dc89a566d561d29a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.18

Security for slycache 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.

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