Skip to main content

A dead simple caching lib

Project description

Dead Simple Cache

A dead simple thread-safe caching lib powered by shelve.

Usage

Include the plugin as dependency and use it as:

>>> from dead_simple_cache import SimpleCache
>>> cache = SimpleCache(file_path="~/.cache/cache")
>>> cache.add(key="tsf jazz", data={"name": "tsf jazz", "url": "http://tsfjazz.ice.infomaniak.ch/tsfjazz-high.mp3"})
>>> cache.get(query="tsf jazz")
  {'tsf jazz': [{'name': 'tsf jazz',
    'url': 'http://tsfjazz.ice.infomaniak.ch/tsfjazz-high.mp3'}]}
>>> cache.get(query="tsf jas")
    {}
>>> cache.get(query="tsf jas", fuzzy=True)
  {'tsf jazz': [{'name': 'tsf jazz',
    'url': 'http://tsfjazz.ice.infomaniak.ch/tsfjazz-high.mp3'}]}

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

dead_simple_cache-1.2.2-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file dead_simple_cache-1.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for dead_simple_cache-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 792e744d41a4172656d7c1d85d505174a70a233285a8560d4e1ab7b8379b4f10
MD5 762c2bd691248dee4690ba78b7a7b427
BLAKE2b-256 284e126ea760c7510118549fa9c4829c2ef3a8128ca7af80870110f0ff4ab693

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page