Metadata-Version: 2.1
Name: dead-simple-cache
Version: 1.2.1
Summary: A dead simple caching lib
Home-page: https://github.com/femelo/dead-simple-cache
Author: Flávio De Melo
Author-email: flavio.eler@gmail.com
License: Apache 2.0
Keywords: caching
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: rapidfuzz

# 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'}]}
```
