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.0.tar.gz (125.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.0-py3-none-any.whl (40.3 kB view details)

Uploaded Python 3

File details

Details for the file weightsdb-0.2.0.tar.gz.

File metadata

  • Download URL: weightsdb-0.2.0.tar.gz
  • Upload date:
  • Size: 125.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.0.tar.gz
Algorithm Hash digest
SHA256 5edabbc63a5da6acd2334b50e3029b132caa047dafdf7a4484021b61f04c78bc
MD5 66a50f5586f6b971475d90645b5d826b
BLAKE2b-256 89062fa2e408b0b7374f8294a2eadf3887a9096c7ec6ed662828756576279d48

See more details on using hashes here.

Provenance

The following attestation bundles were made for weightsdb-0.2.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: weightsdb-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 40.3 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7f76be69db9dd905141370920f8a93dbfda8bfadbf0b343ba49ebc6d4c4891f0
MD5 fa49539dc9cf8f3ba0ffe4fa5c8bbee3
BLAKE2b-256 80ad16e03b6151c2b81f22e5ef464fc250885c6a521d9a240ffb515533bf5e87

See more details on using hashes here.

Provenance

The following attestation bundles were made for weightsdb-0.2.0-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

0.2.1

2 files

This release

0.2.0 This release

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