weaklru
Simple combination of a weakref cache and a lru cache.
class Obj:
pass
l = WeakLRU(max_size=2)
l.set("a", Obj())
l.set("b", Obj())
l.set("c", Obj())
l.get(a) # none
l.get(b) # obj
l.get(c) # obj
You can add objects to the cache, and they will never expire as long as they are being used.
Also, a maximum number of objects will be stored in the LRU portion of the cache.
Metadata
Release files for weaklru 0.1.1
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 |
|---|---|---|---|---|
| weaklru-0.1.1.tar.gz | 2.7 kB | Without provenance | Details for weaklru-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| weaklru-0.1.1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for weaklru-0.1.1-py2.py3-none-any.whl |
Total release size: 6.3 kB
Release files / weaklru-0.1.1.tar.gz
| Download URL | weaklru-0.1.1.tar.gz |
|---|---|
| Size | 2.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7aac7504b2023087d95908502785be4aebc294a132cf28d2b4660cfc066f6b64
|
|
BLAKE2b-256 checksum How to use checksums |
c31b89dac84b14d425e9fc3d4866f9e2f63a4dade92a9dc2a9f7e9417a570f4b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.10 CPython/3.6.8 Windows/10
|
Release files / weaklru-0.1.1-py2.py3-none-any.whl
| Download URL | weaklru-0.1.1-py2.py3-none-any.whl |
|---|---|
| Size | 3.6 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
3c1a2d0e7170b0c69bc00805cc43a61eb949b240f70ecb157f41585006908fd9
|
|
BLAKE2b-256 checksum How to use checksums |
01c464dbc884946232caa65c456331955f406a4524f00861c645908528574134
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.10 CPython/3.6.8 Windows/10
|
Security for weaklru 0.1.1
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.