chestkey
A generic storage datatype based on deterministic identities.
from pathlib import Path
from chestkey import Chest, Key
def add(x: int, y: int) -> int:
return x + y
def cached_add(x: int, y: int) -> int:
chest = Chest(Path(".cache"))
key = Key[int]((add.__code__, x, y))
if chest.contains(key):
return chest.get(key)
z = add(x, y)
chest.set(key, z)
return z
Release files for chestkey 0.3.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 | |
|---|---|---|---|
| chestkey-0.3.0.tar.gz | 3.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| chestkey-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.7 kB
Release files / chestkey-0.3.0.tar.gz
| Download URL | chestkey-0.3.0.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5a87088d9c9470d18033b514e9d0897ade6b3f24e64f338da3f27f24b8f46ad9
|
|
BLAKE2b-256 checksum How to use checksums |
44287002fdf5fc17b53da32dd12e517086752a9eab88980aad856d5211569abb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / chestkey-0.3.0-py3-none-any.whl
| Download URL | chestkey-0.3.0-py3-none-any.whl |
|---|---|
| Size | 3.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3fe0e8bff3d60d443561b4dd46f02986da8ce5f02427e28f3e46391a564824f3
|
|
BLAKE2b-256 checksum How to use checksums |
6af0b44e22f5b73e185a9ac5733ad40433acf16c4ac1859c30dcbb6a9dab471c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|