Skip to content

prodkit-labs/sqlmodel-ai-service-production-kit

Repository files navigation

sqlmodel-ai-service-production-kit

Local-first SQLModel kit for AI services that need tenant-safe records, prompt/run storage, migration fixtures, and evaluation reports before using a production database.

The quickstart uses SQLite fixture data only. It does not call model providers or require a database server.

What It Includes

  • SQLModel tables for tenants, projects, datasets, model runs, and evaluations
  • fixture data for two tenants
  • tenant-safe repository functions
  • migration plan fixture with rollback notes
  • evaluation fixture storage and summary report
  • FastAPI endpoints, tests, CI, local demo, and production docs

Quickstart

python -m venv .venv
. .venv/bin/activate
python -m pip install -e ".[dev]"
pytest -q
python examples/local-only-demo/demo_client.py

Run the API locally:

uvicorn prodkit_sqlmodel_ai.app:app --reload

Try fixture endpoints:

curl http://127.0.0.1:8000/health
curl http://127.0.0.1:8000/tenants
curl http://127.0.0.1:8000/tenants/tenant-acme/datasets
curl http://127.0.0.1:8000/tenants/tenant-acme/runs
curl http://127.0.0.1:8000/migration-plan
curl http://127.0.0.1:8000/evaluation-report

Local Boundaries

  • Fixture prompts are synthetic.
  • Tenant-owned reads require a tenant id.
  • No provider tokens or external database URLs are needed.
  • Migration output is a planning fixture, not an automatic database migration.

Production Docs

Start with production/README.md.

License

MIT

About

SQLModel AI service production kit with tenant-safe data access, model runs, evaluations, and migration fixtures.

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages