WeightsDB
Shared SQLAlchemy + Alembic plumbing: engines, sessions, pragmas, migrations, backup and health. No application table, no shared schema.
Status: Phases 1–3 complete — engine, sessions, types, migrations, backup/restore and health
are implemented and tested on SQLite (PostgreSQL exercised wherever a server is configured; see
docs/packages/weightsdb/development-plan.md).
Extracted from FreeWeight's infrastructure.db per ADR-0011; FreeWeight itself adopts this package
in its own Phase 12 — see docs/adoption-checklist.md.
Part of the Local AI Suite.
Install
pip install weightsdb
# or, with PostgreSQL support:
pip install "weightsdb[postgres]"
Quickstart
from weightsdb import create_engine_for, session_factory, session_scope
engine = create_engine_for("sqlite:///./myapp.sqlite3")
factory = session_factory(engine)
with session_scope(factory) as session:
...
See docs/quickstart.md for the full walkthrough (engine, schema, sessions, upserts, migrations, backup/restore, health, and testing your own application against it), and docs/packages/weightsdb/spec.md §20 for the formal acceptance criteria.
Documentation
Project documentation lives under docs/. Start with docs/README.md.
| Read this | For |
|---|---|
| docs/quickstart.md | Get started: engine, schema, sessions, migrations, backup, health |
| docs/adoption-checklist.md | FreeWeight Phase 12: what to delete, what changed shape, what must still pass |
| docs/packages/weightsdb/spec.md | Purpose, scope, non-goals, public contracts, configuration, acceptance criteria |
| docs/packages/weightsdb/development-plan.md | The phased build plan: goals, work, tests, acceptance criteria per phase |
Development
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
pre-commit install
pytest -m "not live and not performance"
See CONTRIBUTING.md for the full workflow and SECURITY.md for
how to report a vulnerability.
License
Apache-2.0 — see LICENSE.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file weightsdb-0.2.1.tar.gz.
File metadata
- Download URL: weightsdb-0.2.1.tar.gz
- Upload date:
- Size: 126.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e1f9ce64f7e8165b16adfd131b70b798dcc7de4d8b9c9b611eae9c83e1e34993
|
|
| MD5 |
0a033145cfdd7f2aa934a20c293016d2
|
|
| BLAKE2b-256 |
af2fae712475cd65ae58533f41b21f6ea866d61310168d9142170b7c0e34cc1b
|
Provenance
The following attestation bundles were made for weightsdb-0.2.1.tar.gz:
Publisher:
release.yml on JPKell/WeightsDB
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
weightsdb-0.2.1.tar.gz -
Subject digest:
e1f9ce64f7e8165b16adfd131b70b798dcc7de4d8b9c9b611eae9c83e1e34993 - Sigstore transparency entry: 2666414491
- Sigstore integration time:
-
Permalink:
JPKell/WeightsDB@88f7ff54b4a0c1491f119c610290779cbc130af1 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/JPKell
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@88f7ff54b4a0c1491f119c610290779cbc130af1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file weightsdb-0.2.1-py3-none-any.whl.
File metadata
- Download URL: weightsdb-0.2.1-py3-none-any.whl
- Upload date:
- Size: 40.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b105fffbb8c639c129d2a0bb5231298ec5d8ed91c2bb1e4667039c90bb2f8776
|
|
| MD5 |
83b635b651af732bcb1c00528948a5ba
|
|
| BLAKE2b-256 |
ef26951c76a7421532b29d51d92f530065662f31ddcb2c4976b5e1226d95b50a
|
Provenance
The following attestation bundles were made for weightsdb-0.2.1-py3-none-any.whl:
Publisher:
release.yml on JPKell/WeightsDB
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
weightsdb-0.2.1-py3-none-any.whl -
Subject digest:
b105fffbb8c639c129d2a0bb5231298ec5d8ed91c2bb1e4667039c90bb2f8776 - Sigstore transparency entry: 2666414509
- Sigstore integration time:
-
Permalink:
JPKell/WeightsDB@88f7ff54b4a0c1491f119c610290779cbc130af1 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/JPKell
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@88f7ff54b4a0c1491f119c610290779cbc130af1 -
Trigger Event:
push
-
Statement type: