Cache any python object to file using improved pickling
Installation
Installing it is pretty easy:
pip install anycache
Getting Started
>>> from anycache import anycache
>>> @anycache()
... def myfunc(posarg, kwarg=3):
... print(" Calcing %r + %r = %r" % (posarg, kwarg, posarg + kwarg))
... return posarg + kwarg
>>> myfunc(8, 5)
Calcing 8 + 5 = 13
13
>>> myfunc(8, 5)
13
anycache caches nearly any python object. Also lambda statements.
It uses dill as backend. An improved version of pythons built-in pickle.
To preserve the result between multiple python runs, set a persistent cache directory.
>>> from anycache import anycache
>>> @anycache(cachedir='/tmp/anycache.my')
... def myfunc(posarg, kwarg=3):
... return posarg + kwarg
The AnyCache object serves additional functions for cache clearing and
size handling.
Metadata
Release files for anycache 2.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| anycache-2.4.0.tar.gz | 11.0 kB | Without provenance | Details for anycache-2.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| anycache-2.4.0-py3-none-any.whl | Python 3 | none | any | Details for anycache-2.4.0-py3-none-any.whl |
Total release size: 19.3 kB
Release files / anycache-2.4.0.tar.gz
| Download URL | anycache-2.4.0.tar.gz |
|---|---|
| Size | 11.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
99d3da200c7890fc9bba2c6c05470d34789483ed0115ee2885b72753aa235629
|
|
BLAKE2b-256 checksum How to use checksums |
a22f780bebd471b5a0fb9f53928d96726c7f17450d4d291a61e1b61988bab09c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
pdm/2.23.0 CPython/3.13.2 Linux/6.8.0-1021-azure
|
Release files / anycache-2.4.0-py3-none-any.whl
| Download URL | anycache-2.4.0-py3-none-any.whl |
|---|---|
| Size | 8.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8e0fa7ea06e6929446a7805e28780038353a75067a26a4f79df97e886c982ca7
|
|
BLAKE2b-256 checksum How to use checksums |
cdbb0750b6253968c97646a5da67d203fa219e2fe1be3ace5e7615a29544e4b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
pdm/2.23.0 CPython/3.13.2 Linux/6.8.0-1021-azure
|
Security for anycache 2.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.