Metadata-Version: 2.1
Name: dead-simple-cache
Version: 1.1.0
Summary: A dead simple Python 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

# Metadata 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.db")
>>> cache.add(key="tsf jazz", data={"name": "tsf jazz", "url": "http://tsfjazz.ice.infomaniak.ch/tsfjazz-high.mp3"})
>>> cache.get(query="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)
    [{'name': 'tsf jazz',
      'url': 'http://tsfjazz.ice.infomaniak.ch/tsfjazz-high.mp3'}]
```
