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((add.__code__, x, y))
if chest.contains(key):
return chest.get[int](key)
z = add(x, y)
chest.set(key, z)
return z
Release files for chestkey 0.1.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.1.0.tar.gz | 3.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| chestkey-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.0 kB
Release files / chestkey-0.1.0.tar.gz
| Download URL | chestkey-0.1.0.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4d5e528b8a941beab5f73cb8630fe8643d9b9c00377a52db5a371f003db749a7
|
|
BLAKE2b-256 checksum How to use checksums |
8b9c6864c1c0ed587f16436779e7c94218733891d338b91b527df4c8ce4f6d9b
|
| 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.1.0-py3-none-any.whl
| Download URL | chestkey-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d9378ba7f58823d2a50ff267b6ba2e6d9b1e767ea2eef712ad32f8e879c93ddc
|
|
BLAKE2b-256 checksum How to use checksums |
1fb0ac9733009d37c272841fb1131a08661752800f15c694fec1035e0cb55d52
|
| 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}
|