A simple key-value caching API with default implementations for an SQLite3 storage backend and a JSON convenience layer.
Project description
Note: This package is in the dangerous land of
0.x.y
versions and may be subject to breaking changes with minor version increments.
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.2.0.tar.gz
(7.0 kB
view hashes)
Built Distribution
Close
Hashes for nr.caching-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23dfb327f5c370bb071415b9fb842fe1002f81cf859270e53ed0d33a9750c82f |
|
MD5 | 0cd7a5eb7196a92c058d7b092d017ccb |
|
BLAKE2b-256 | a028cb76bd9ac364bf638e4f27209e395ce9e3a30ca418b70803104817b14342 |