poche
Simple and fast Python in-memory caching with support for TTLs.
Meant to speed up using dictionaries as cache backend for simple usecases.
No external dependencies, 100% code coverage and static type checked.
Installation
Requires Python 3.6+.
pip install poche
Roadmap
v1:
- Basic TTL
-
get -
set -
getset -
flush
v1.1:
-
expire -
persist -
rename
v1.2:
-
getorsetwith callback
Example
from time import sleep
import poche
>>> c = poche.Cache()
>>> c.set("one", "uno")
>>> c.get("one")
"uno"
>>> c.get("two")
None
>>> c.getset("two", "dos")
None
>>> c.get("two")
"dos"
>>> c.set("three", "tres", ttl=2)
>>> c.get("three")
"tres"
>>> sleep(2)
>>> c.get("three")
None
>>> c = poche.Cache(ttl=2) # you can also define a default TTL
>>> c.set("four", "cuatro")
>>> c.get("four")
"cuatro"
>>> sleep(2)
>>> c.get("four")
None
Metadata
Release files for poche 1.0.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 |
|---|---|---|---|---|
| poche-1.0.0.tar.gz | 15.8 kB | Without provenance | Details for poche-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| poche-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for poche-1.0.0-py3-none-any.whl |
Total release size: 31.8 kB
Release files / poche-1.0.0.tar.gz
| Download URL | poche-1.0.0.tar.gz |
|---|---|
| Size | 15.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
596469ba9e21fa3a3ef2a2d4e88fa3f3a3e41fa1a6e9987dd9449edfb679158a
|
|
BLAKE2b-256 checksum How to use checksums |
43d69071e24d7f88c1a3433eac1cc90f9bf3f57fdf470b20bfb0304e03e64866
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.4 CPython/3.9.1 Darwin/18.7.0
|
Release files / poche-1.0.0-py3-none-any.whl
| Download URL | poche-1.0.0-py3-none-any.whl |
|---|---|
| Size | 16.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2ab3fb399045320c1aec4c218b74face358ea46fccadc05a1e7a949046d9c53e
|
|
BLAKE2b-256 checksum How to use checksums |
acbf2eb57a97280c045c0e457cdecdef458005f8320f48887af46dab275c3de3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.4 CPython/3.9.1 Darwin/18.7.0
|
Security for poche 1.0.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.