# Dead Simple Cache
A dead simple thread-safe caching lib powered by [shelve](https://docs.python.org/3/library/shelve.html).
## Usage
Include the plugin as dependency and use it as:
```python
>>> 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'}]}
```
Raw data
{
"_id": null,
"home_page": "https://github.com/femelo/dead-simple-cache",
"name": "dead-simple-cache",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "caching",
"author": "Fl\u00e1vio De Melo",
"author_email": "flavio.eler@gmail.com",
"download_url": null,
"platform": null,
"description": "# Dead Simple Cache\n\nA dead simple thread-safe caching lib powered by [shelve](https://docs.python.org/3/library/shelve.html).\n\n## Usage\n\nInclude the plugin as dependency and use it as:\n\n```python\n>>> from dead_simple_cache import SimpleCache\n>>> cache = SimpleCache(file_path=\"~/.cache/cache\")\n>>> cache.add(key=\"tsf jazz\", data={\"name\": \"tsf jazz\", \"url\": \"http://tsfjazz.ice.infomaniak.ch/tsfjazz-high.mp3\"})\n>>> cache.get(query=\"tsf jazz\")\n {'tsf jazz': [{'name': 'tsf jazz',\n 'url': 'http://tsfjazz.ice.infomaniak.ch/tsfjazz-high.mp3'}]}\n>>> cache.get(query=\"tsf jas\")\n {}\n>>> cache.get(query=\"tsf jas\", fuzzy=True)\n {'tsf jazz': [{'name': 'tsf jazz',\n 'url': 'http://tsfjazz.ice.infomaniak.ch/tsfjazz-high.mp3'}]}\n```\n",
"bugtrack_url": null,
"license": "Apache 2.0",
"summary": "A dead simple caching lib",
"version": "1.2.2",
"project_urls": {
"Homepage": "https://github.com/femelo/dead-simple-cache"
},
"split_keywords": [
"caching"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "284e126ea760c7510118549fa9c4829c2ef3a8128ca7af80870110f0ff4ab693",
"md5": "762c2bd691248dee4690ba78b7a7b427",
"sha256": "792e744d41a4172656d7c1d85d505174a70a233285a8560d4e1ab7b8379b4f10"
},
"downloads": -1,
"filename": "dead_simple_cache-1.2.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "762c2bd691248dee4690ba78b7a7b427",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 7518,
"upload_time": "2024-05-30T07:34:06",
"upload_time_iso_8601": "2024-05-30T07:34:06.926762Z",
"url": "https://files.pythonhosted.org/packages/28/4e/126ea760c7510118549fa9c4829c2ef3a8128ca7af80870110f0ff4ab693/dead_simple_cache-1.2.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-30 07:34:06",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "femelo",
"github_project": "dead-simple-cache",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "rapidfuzz",
"specs": []
}
],
"lcname": "dead-simple-cache"
}