0.2.8 Release Notes
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}).
Klepto provides both standard and 'safe' caching, where safe caches are slower but can recover from hashing errors. Klepto is intended to be used for distributed and parallel computing, where several of the keymaps serialize the stored objects. Caches and archives are intended to be read/write accessible from different threads and processes. Klepto enables a user to decorate a function, save the results to a file or database archive, close the interpreter, start a new session, and reload the function and it's cache.
Klepto installs with pip:
$ pip install klepto
Klepto requires:
- python or pypy, >=3.9
- dill, >=0.4.1
- pox, >=0.3.7
Optional requirements:
- sqlalchemy, >=1.4.0 (install with $ pip install klepto[archives])
- h5py, >=2.8.0 (install with $ pip install klepto[archives])
- pandas, >=0.17.0 (install with $ pip install klepto[archives])
Klepto is licensed under 3-clause BSD:
>>> import klepto
>>> print (klepto.license())
To cite klepto:
>>> import klepto
>>> print (klepto.citation())
What's Changed
- Bump jinja2 from 3.1.5 to 3.1.6 in /docs by @dependabot[bot] in #147
- drop formal support for python 3.8 by @mmckerns in #148
- Bump h11 from 0.14.0 to 0.16.0 in /docs by @dependabot[bot] in #149
- sync docs with RTD 13.4.0 and codecov token by @mmckerns in #151
- update rtfd to 3.12 and docs requirements by @mmckerns in #153
- formal support for 3.14; init support for 3.15 by @mmckerns in #154
- sync with rtd 15.4.1 by @mmckerns in #156
- update copyright for 2026, urllib3 to 2.6.0 by @mmckerns in #158
- sync with rtfd 15.10.0 by @mmckerns in #160
- Bump urllib3 from 2.6.0 to 2.6.3 in /docs by @dependabot[bot] in #159
- travis use noble, 3.15t, 3.14, coverage on 3.10 by @mmckerns in #161
Full Changelog: 0.2.7...0.2.8