pytypehintstore
Rows of one validated dataclass, in memory, shadowed by a JSON file you can open and edit. The class is the database.
The file is named for the class and the fingerprint of its compiled schema, so if the file opens, every row in it is valid against this exact schema. Change the contract and it is a new database; the old file stays beside it, whole and readable.
from dataclasses import dataclass
from typing import Annotated
from pytypehint import Max, Min
from pytypehintstore import store_of
@dataclass
class Task:
title: Annotated[str, Min(1), Max(80)]
done: bool = False
tasks = store_of(Task, "data") # data/Task.<fingerprint>.json
row_id = tasks.add(Task(title="Buy milk")) # 1
tasks.get(row_id) # Task(title='Buy milk', done=False)
tasks.close()
The full documentation is at https://offerrall.github.io/pytypehintstore/.
Documentation
- Overview: how the store works and a full walk-through of its operations.
- The guarantee: every row a store opens was rebuilt through your schema.
- The identity: the file name, and why any change to the class is a new database.
- The file: the JSON on disk, editing it by hand, and every load error.
- Writing: debounced, atomic dumps, rotated copies and
close(). - The lock: one process per store, and how orphaned lockfiles are taken over.
- API:
store_of, its methods and its exceptions. - Limits: what the store does not do, stated plainly.
Metadata
Release files for pytypehintstore 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pytypehintstore-1.0.2.tar.gz | 104.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pytypehintstore-1.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 118.6 kB
Release files / pytypehintstore-1.0.2.tar.gz
| Download URL | pytypehintstore-1.0.2.tar.gz |
|---|---|
| Size | 104.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
451510983f9966c5aa10c856fa8f003b52abb7bb7b685885532a07c3c8266090
|
|
BLAKE2b-256 checksum How to use checksums |
ca5b9d5dff47f567d03d3bfd717ec9322dc1e9c57ab532c21c3df3e3b6998d5a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.
Transparency logRelease files / pytypehintstore-1.0.2-py3-none-any.whl
| Download URL | pytypehintstore-1.0.2-py3-none-any.whl |
|---|---|
| Size | 13.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4a2ea9eb9c74c1edf712938777a47e0ab08e9b2f0743484b550acda84ddf9bf6
|
|
BLAKE2b-256 checksum How to use checksums |
cdaefc59b098f73bdd320daec3d8a256fc2c0aa43bf2c5eaae60c3e89f337496
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.
Transparency log