Database Seeder
Quickly populate development databases with realistic test data.
Features
- Schema-aware data generation (reads existing table structure)
- Built-in generators: names, emails, addresses, lorem ipsum, UUIDs
- Foreign key relationship awareness
- Configurable row counts per table
- Seed files for reproducible datasets
- SQL dump import/export
Usage
# Auto-detect schema and seed all tables
python scripts/seed.py --db-url postgresql://localhost/dev_db --rows 100
# Use a seed configuration file
python scripts/seed.py --db-url sqlite:///dev.db --config seeds/users.yml
# Export current data as seed file
python scripts/seed.py --db-url mysql://localhost/dev --export --table users
Seed Configuration
table: users
rows: 50
columns:
email: {generator: email, domain: example.com}
name: {generator: name}
password_hash: {generator: bcrypt, value: "TestPassword123!"}
role: {generator: enum, values: [admin, editor, viewer]}
api_key: {generator: uuid}
created_at: {generator: timestamp, range: [2023-01-01, 2024-12-31]}
Important
This tool is for development environments only. Never run against production databases. Seed data includes fake credentials and tokens that must not be used in production.

