klepto
persistent caching to memory, disk, or database
klepto extends python's lru_cache to utilize different keymaps and alternate caching algorithms, such as lfu_cache and mru_cache. While caching is meant for fast access to saved results, klepto also has archiving capabilities, for longer-term storage. klepto uses a simple dictionary-sytle interface for all caches and archives, and all caches can be applied to any python function as a decorator. Keymaps are algorithms for converting a function's input signature to a unique dictionary, where the function's results are the dictionary value. Thus for y = f(x), y will be stored in cache[x] (e.g. {x:y}).
homepage ↗ pypi: klepto github: uqfoundation/klepto
Available in
| Overlay | Newest | Ebuilds | Last activity | |
|---|---|---|---|---|
| hep-forge GitLab ↗ | 0.2.4 | 2 | 14 d | details › |
| pypi GitHub ↗ | 0.2.8 | 1 | 5 mo | details › |
Versions & arches
Use flags of 0.2.8
- archives
- crypto
4 expansion flags (python targets, ABIs, cpu flags…)
- python_targets_python3_11
- python_targets_python3_12
- python_targets_python3_13
- python_targets_python3_14