Skip to main content

Nano cache

Package version Package version

A simple and lightweight dictionary-based persistent cache for storing python objects.

Installation:

pip install ncache

Usage:

from ncache import Cache

cache = Cache('my.cache')
cache.load_cache()

values = []
try:
    _hash = cache.get_hash('key') 
    val = cache.get_value(_hash)  # raise NoCacheValue exception if not found
    values += [val]
    print('Value got from cache:', values)
except:
    # if not in cache then add it
    val = {'value'}
    cache.set_value(_hash, val)
    values += [val]
    print('Value added:', values)

cache.save_cache()

Metadata

Release files for ncache 0.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 ncache 0.4
File Size Uploaded Provenance Actions
ncache-0.4.tar.gz 15.4 kB Without provenance Details for ncache-0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ncache 0.4
File Interpreter ABI Platform Actions
ncache-0.4-py2.py3-none-any.whl Python 3, Python 2 none any Details for ncache-0.4-py2.py3-none-any.whl

Total release size: 30.8 kB

Release files / ncache-0.4.tar.gz

Download URL ncache-0.4.tar.gz
Size 15.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e9cec3de4eee9cd8b3f8a3999bffe6c144d69d32f1ba8faa236c2b25a92be3c5
BLAKE2b-256 checksum
How to use checksums
d2448694e2e65bea729066413ad5cd32a3d8581d40c6529dda7c4313e5225f15
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.7

Release files / ncache-0.4-py2.py3-none-any.whl

Download URL ncache-0.4-py2.py3-none-any.whl
Size 15.4 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
bda5b781bd55d225efa65623bd8eaf43cc3132b00af5bcdb3946929c8db70cc5
BLAKE2b-256 checksum
How to use checksums
735f5f1497c7fd87acd4c4c0614ff1bfb7abf3cbf81cf63f1b40a816e12a153f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.7

Security for ncache 0.4

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