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
File details
Details for the file dead_simple_cache-1.2.1-py3-none-any.whl
.
File metadata
- Download URL: dead_simple_cache-1.2.1-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2ec27f39a174e3f00bf9796cc144ce2717d238f1d347f08233476b47df848a6 |
|
MD5 | def81f22625f51eb61e172e60b52cc60 |
|
BLAKE2b-256 | 00e3e0da4fda5bc84609559ca013736d9b96fbde239a25ff50ca5f273f2af728 |