Skip to main content

Travis

Python Simple Cache - scache

Installation

$ [sudo] pip install scache

How it works

scache uses .json files in the data subdirectory by default. If they exist, they are overwritten. If they do not, they are created.

./data/<key>.json by default

Get Started

'''Optional parameters:
path: (string) Path where to store the .json cache data.
    defaults to './data/'
debug: (boolean) Prints debug information such as whether or not keys were found.
    defaults to False
'''
from scache import SCache
scache = SCache()
scache.set('key', 'value')

Functions

function __doc__
scache.get(key) Gets cache value.
scache.get(key, value) Sets cache value.
scache.get(key, default) Get cache value. Return default if not found
scache.rm(key) Remove cache by key
scache.exists(key) returns True if key exists, else returns False
scache.empty() Clears the entire cache.

Examples

>>> import scache
>>> scache.set("key", {'test': 1})
>>> scache.get("key")
"{'test': 1}"
>>> scache.exists("key")
True
>>> scache.rm("key")
>>> scache.empty() # clears entire cache

Metadata

Release files for scache 1.3.0

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

Source distribution (sdist)

Source distribution for scache 1.3.0
File Size Uploaded Provenance
scache-1.3.0.tar.gz 3.1 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 7.0 kB

Release files / scache-1.3.0.tar.gz

Download URL scache-1.3.0.tar.gz
Size 3.1 kB
Tags Source
SHA-256 checksum
How to use checksums
baed7741b7ce0a36a96ddd6efc28496322705bd60de425ac4650167b5f592914
BLAKE2b-256 checksum
How to use checksums
cbf19515d0d3ff97301961371f3c778555755c98ceec05f8edfec4ee5a354cce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.8.0 tqdm/4.43.0 CPython/3.8.1

Release files / scache-1.3.0-py3-none-any.whl

Download URL scache-1.3.0-py3-none-any.whl
Size 3.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7f5ec1f33cb85f20d819ae65b503629d4acb5280965d92f524b79c988cf8888f
BLAKE2b-256 checksum
How to use checksums
cd86670b9c4a3be66b2b0a26a916872fb5ae355293007bcad3d0bac40acfd1a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.8.0 tqdm/4.43.0 CPython/3.8.1

Security for scache 1.3.0

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