Apocrypha

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}).

Available in

OverlayNewestEbuildsLast activity
hep-forge GitLab ↗ 0.2.4 2 14 d details ›
pypi GitHub ↗ 0.2.8 1 5 mo details ›

Versions & arches

VersionOverlay amd64x86 Committed
0.2.8 pypi amd64 testing x86 testing view · download · history ↗
0.2.4 hep-forge amd64 testing x86 untested 2 yr view · download · history ↗
0.2.3 hep-forge amd64 testing x86 untested 2 yr view · download · history ↗

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

Runtime dependencies of 0.2.8

show 29 lines