Quick Start
The fast path. Copy-paste, done:
pip install dbsprout
dbsprout init --db sqlite:///myapp.db # or --file schema.sql
dbsprout generate # 100 rows/table, SQL, ./seeds/
dbsprout validate # FK/PK/UNIQUE/NOT NULL = 100%
init writes a dbsprout.toml and a schema snapshot under .dbsprout/.
generate writes numbered files (001_authors.sql, 002_books.sql, …) so
they apply in FK order. --seed (default 42) makes output reproducible.
What you’ll see
init introspects the target and prints a summary of every table, column, and
foreign key it found:
Schema Summary
┏━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━┳━━━━━━━━━━━━━┓
┃ Table ┃ Columns ┃ FKs ┃ Primary Key ┃
┡━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━╇━━━━━━━━━━━━━┩
│ authors │ 3 │ 0 │ id │
│ books │ 4 │ 1 │ id │
│ orders │ 4 │ 1 │ id │
│ order_items │ 4 │ 2 │ id │
└─────────────┴─────────┴─────┴─────────────┘
Wrote dbsprout.toml — 4 tables, 6 FK edges, 0 cycles.
Tables are generated in topological order, so a child row never references a parent that doesn’t exist yet — foreign keys resolve to real parent keys, and cycles are broken automatically.
Load it
The generated files are plain INSERT statements, ordered for safe replay.
Pipe them straight into your database:
sqlite3 myapp.db < seeds/*.sql
# or Postgres
psql "$DATABASE_URL" -f seeds/001_authors.sql
Offline by default. The heuristic engine ships inside the package — no internet, API key, or account required. The same
--seedproduces byte-identical output on every machine, so it’s safe to pin in CI.
Where next
- Core Concepts — how the pipeline, FK resolution, and engines work
- From a Database — a full worked example against PostgreSQL, MySQL, or SQLite
- From a Schema File — SQL, DBML, Prisma, Mermaid, PlantUML, Django
- Recipes — solve a specific problem
- CLI Reference — every command and option