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.2.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.2.0.tar.gz | 3.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| chestkey-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.9 kB
Release files / chestkey-0.2.0.tar.gz
| Download URL | chestkey-0.2.0.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4916b53f87079f6001c9f458d28a6d0cefb1a190aa04f50a8a2bea1bfa565efa
|
|
BLAKE2b-256 checksum How to use checksums |
c9aad17a62fa92e6636817e666d479961ce44be2001479d2d37bb6825afc4c6a
|
| 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.2.0-py3-none-any.whl
| Download URL | chestkey-0.2.0-py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
10b1211f549a31e60a1336695bb8dc2bf12ae28cab2b8588301093b118d4beb2
|
|
BLAKE2b-256 checksum How to use checksums |
2969d41cff2d47563c795004c416446057af30e7eff7860b0ff7737f85bd54f6
|
| 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}
|