SeedForge
Database seeding tool. Connects to your DB, reads the schema, generates realistic data with valid foreign keys.
pip install seedforge
seedforge connect postgresql://user:pass@localhost/mydb
seedforge generate --rows 1000
Why
I got tired of writing seed scripts by hand every time I start a new project. You know the drill — empty dashboards, nothing to test against, and if you copy prod data you're asking for GDPR trouble.
SeedForge reads your schema and figures out the rest. It knows that orders.user_id points to users.id, so it fills users first. It knows that a column called email should look like an email, not random gibberish.
Install
pip install seedforge # PostgreSQL + SQLite
pip install seedforge[mysql] # + MySQL/MariaDB
pip install seedforge[mssql] # + SQL Server
pip install seedforge[ai] # + AI providers
pip install seedforge[all] # everything
Usage
# save connection (writes .seedforge.yaml)
seedforge connect postgresql://user:pass@localhost:5432/mydb
seedforge connect mysql://user:pass@localhost:3306/mydb
seedforge connect sqlite:///path/to/db.sqlite
seedforge connect mssql://sa:pass@localhost/mydb
# see what's in the database
seedforge inspect
# generate and insert
seedforge generate --rows 100
# just preview, don't touch the DB
seedforge generate --rows 10 --dry-run
# export instead of inserting
seedforge generate --rows 1000 --export sql
seedforge generate --rows 1000 --export json
# same data every time
seedforge generate --rows 100 --seed 42
# specific tables only (pulls in FK parents automatically)
seedforge generate --tables orders,payments --rows 50
# wipe tables first
seedforge generate --rows 100 --clean
AI mode
If you want smarter data (realistic product names, proper bios, etc.), you can plug in an API key. SeedForge auto-detects the provider:
seedforge ai-generate --api-key sk-ant-... # Anthropic
seedforge ai-generate --api-key sk-... # OpenAI
seedforge ai-generate --api-key AIza... # Google Gemini
seedforge ai-generate --api-key gsk_... # Groq
Or set an env var (ANTHROPIC_API_KEY, OPENAI_API_KEY, GEMINI_API_KEY, GROQ_API_KEY) and just run seedforge ai-generate.
Only schema metadata goes to the API — table and column names, never your actual data.
How it works
- Connects to your database and reads
information_schema(PostgreSQL/MySQL) orPRAGMA(SQLite) - Builds a dependency graph from foreign keys, topological sort gives the insertion order
- For each column, picks a generator based on the name —
emailgets a realistic email,pricegets a decimal,created_atgets a recent timestamp, and so on (80+ patterns) - Foreign key columns get real IDs from already-generated parent rows
- Batch inserts everything in a single transaction
What it recognizes
Some examples — there are 80+ patterns total:
| Column | Data |
|---|---|
email |
john.smith@example.com |
phone |
+1-555-0123 |
first_name / last_name |
John / Smith |
price, amount |
49.99 |
role |
admin, user, moderator |
status |
active, pending, completed |
created_at |
recent datetime |
is_active |
true (biased) |
password |
SHA-256 hash |
avatar_url |
https://picsum.photos/... |
uuid |
valid v4 UUID |
It's also context-aware: name in a users table gives person names, in organizations — company names, in products — product names.
Config
seedforge connect creates a .seedforge.yaml:
db_url: postgresql://user:pass@localhost:5432/mydb
default_rows: 100
default_schema: public
seed: 42
exclude_tables:
- _prisma_migrations
- django_migrations
Migration tables (_prisma_migrations, django_migrations, alembic_version, etc.) are excluded automatically.
Databases
- PostgreSQL (+ CockroachDB)
- MySQL / MariaDB
- SQLite
- Microsoft SQL Server
Contributing
PRs welcome. See CONTRIBUTING.md.
License
MIT
Metadata
Release files for seedforge 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| seedforge-0.5.0.tar.gz | 28.3 kB | Without provenance | Details for seedforge-0.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| seedforge-0.5.0-py3-none-any.whl | Python 3 | none | any | Details for seedforge-0.5.0-py3-none-any.whl |
Total release size: 54.4 kB
Release files / seedforge-0.5.0.tar.gz
| Download URL | seedforge-0.5.0.tar.gz |
|---|---|
| Size | 28.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
674d2f8024949c53e86acdb42f6c23498a48f0f1421dcb9b4323f1a533fbbcac
|
|
BLAKE2b-256 checksum How to use checksums |
1af9e7469d0ec935ca447d1c43c89b7bac06951ec4b688d5ffa0bbff3a5fa115
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.3
|
Release files / seedforge-0.5.0-py3-none-any.whl
| Download URL | seedforge-0.5.0-py3-none-any.whl |
|---|---|
| Size | 26.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8bcb52cec03e25691360c9e5c8394645be948a58da4c643186f71edc683a1ba7
|
|
BLAKE2b-256 checksum How to use checksums |
6defcc2170d326e61c6d8ead706d64950597e94276ea1f7e25c9e5c292ca1344
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.3
|
Security for seedforge 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.