Skip to main content

No project description provided

Project description


Python Simple Cache - scache


$ [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')


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.


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

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for scache, version 1.3.0
Filename, size File type Python version Upload date Hashes
Filename, size scache-1.3.0-py3-none-any.whl (3.9 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size scache-1.3.0.tar.gz (3.1 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page