A simple key-value caching API with default implementations for an SQLite3 storage backend and a JSON convenience layer.
Project description
nr.caching
A simple key-value caching API with default implementations for an SQLite3 storage backend and a JSON convenience layer.
Quickstart
from nr.caching.sqlite import SqliteStore
from nr.caching.json import JsonCache
cache = JsonCache(SqliteStore('.cache.db'))
data = cache.loading('my-namespace', parameters, lambda: expensive_function(*parameters))
Copyright © 2021 Niklas Rosenstein
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nr.caching-0.1.0.tar.gz
(6.0 kB
view hashes)
Built Distribution
Close
Hashes for nr.caching-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29675b95bd5a02961e5801f8b4f39e1bb9287f967ccc9087a1a44b43c7045b0d |
|
MD5 | 10f27d9b5be6442b06023b97b1df78f5 |
|
BLAKE2b-256 | 6de7378665bb107f7ac57a481b6a8347462daf75abcd01c63d0865412b45639e |