Skip to main content

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

weightsdb-0.2.1.tar.gz (126.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

weightsdb-0.2.1-py3-none-any.whl (40.5 kB view details)

Uploaded Python 3

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

Hashes for weightsdb-0.2.1.tar.gz
Algorithm Hash digest
SHA256 e1f9ce64f7e8165b16adfd131b70b798dcc7de4d8b9c9b611eae9c83e1e34993
MD5 0a033145cfdd7f2aa934a20c293016d2
BLAKE2b-256 af2fae712475cd65ae58533f41b21f6ea866d61310168d9142170b7c0e34cc1b

See more details on using hashes here.

Provenance

The following attestation bundles were made for weightsdb-0.2.1.tar.gz:

Publisher: release.yml on JPKell/WeightsDB

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for weightsdb-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b105fffbb8c639c129d2a0bb5231298ec5d8ed91c2bb1e4667039c90bb2f8776
MD5 83b635b651af732bcb1c00528948a5ba
BLAKE2b-256 ef26951c76a7421532b29d51d92f530065662f31ddcb2c4976b5e1226d95b50a

See more details on using hashes here.

Provenance

The following attestation bundles were made for weightsdb-0.2.1-py3-none-any.whl:

Publisher: release.yml on JPKell/WeightsDB

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 files

0.2.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page