Skip to main content

SeedKit

Generate realistic, constraint-safe seed data for any database.

SeedKit connects to your PostgreSQL, MySQL, or SQLite database, reads the schema, and generates seed data that respects foreign keys, unique constraints, check constraints, and enum types -- all without copying production data.

Install

pip install seedkit

Or with pipx for isolated installation:

pipx install seedkit

Quick Start

# Generate 1000 rows per table as SQL
seedkit generate --db postgres://localhost/myapp --rows 1000 --output seed.sql

# Insert into a fresh seed database
seedkit generate --db postgres://localhost/myapp --rows 1000 --output direct

# JSON or CSV output
seedkit generate --db postgres://localhost/myapp --rows 100 --output data.json

# Deterministic output with seed
seedkit generate --db postgres://localhost/myapp --rows 100 --seed 42 --output seed.sql

Database Connection

SeedKit automatically finds your database URL by checking (in order):

  1. --db CLI flag
  2. DATABASE_URL environment variable
  3. .env file in the current directory
  4. seedkit.toml config file

Supported URL formats:

# PostgreSQL
seedkit generate --db postgres://user:pass@localhost:5432/mydb

# MySQL
seedkit generate --db mysql://user:pass@localhost:3306/mydb

# SQLite
seedkit generate --db sqlite://path/to/db.sqlite

AI-Enhanced Classification

SeedKit can use an LLM to improve column classification beyond the built-in 50+ regex rules. This helps with ambiguous column names that the rule engine classifies as Unknown.

# Set one of these environment variables:
export ANTHROPIC_API_KEY=sk-ant-...    # Uses Claude Sonnet (default)
export OPENAI_API_KEY=sk-...           # Uses GPT-4o (default)

# Run with --ai flag
seedkit generate --db postgres://localhost/myapp --rows 1000 --ai --output seed.sql

# Override the model
seedkit generate --db postgres://localhost/myapp --rows 1000 --ai --model claude-opus-4-20250514

The AI classification is cached locally so subsequent runs with the same schema don't re-query the LLM. Results are also stored in the lock file for team reproducibility.

Smart Sampling

Extract statistical distributions from a production database to generate data that mirrors real patterns:

# Sample distributions (read-only, PII auto-masked)
seedkit sample --db postgres://readonly-replica:5432/myapp

# Generate using sampled distributions
seedkit generate --db postgres://localhost/myapp --rows 1000 --subset seedkit.distributions.json

All Commands

Command Description
seedkit generate Generate seed data (SQL, JSON, CSV, or direct insert)
seedkit sample Extract production distributions with PII masking
seedkit introspect Analyze schema and show classification results
seedkit preview Preview sample rows without full generation
seedkit check Detect schema drift against lock file (CI-friendly)
seedkit graph Visualize table dependencies (Mermaid or Graphviz)

Configuration

Create a seedkit.toml in your project root:

[database]
url = "postgres://localhost/myapp"

[generate]
rows = 500
seed = 42

[tables.users]
rows = 1000

[tables.orders]
rows = 5000

# Custom value lists with optional weights
[columns."products.color"]
values = ["red", "blue", "green", "black", "white"]
weights = [0.25, 0.20, 0.20, 0.20, 0.15]

Performance

Operation Throughput
Generation (10 cols, semantic providers) ~480K rows/sec
Generation (FK references only) ~3.7M rows/sec
Classification (100 tables x 20 cols) ~2.1M cols/sec
SQL output formatting ~1.5M rows/sec

Documentation

Full documentation, architecture details, and benchmarks: github.com/kclaka/seedkit

License

MIT

Metadata

Release files for seedkit 1.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for seedkit 1.6.0
File Actions
seedkit-1.6.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for seedkit-1.6.0-py3-none-win_amd64.whl
seedkit-1.6.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details for seedkit-1.6.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
seedkit-1.6.0-py3-none-manylinux1_x86_64.manylinux_2_5_x86_64.whl Python 3 none Linux glibc 2.5+ x86-64 Details for seedkit-1.6.0-py3-none-manylinux1_x86_64.manylinux_2_5_x86_64.whl
seedkit-1.6.0-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for seedkit-1.6.0-py3-none-macosx_11_0_arm64.whl
seedkit-1.6.0-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details for seedkit-1.6.0-py3-none-macosx_10_12_x86_64.whl

Total release size: 26.6 MB

Release files / seedkit-1.6.0-py3-none-win_amd64.whl

Download URL seedkit-1.6.0-py3-none-win_amd64.whl
Size 5.6 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
ec72bbbb91f4e095ee931634340ba961170739fe5a80ffa4a2ef12c0b8a65fa9
BLAKE2b-256 checksum
How to use checksums
f26209446b7e3aaa88ffee2f42d5a6b90edf5dfd4fc3dd8f4d2db6a670d022cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.16.0

Release files / seedkit-1.6.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL seedkit-1.6.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 5.2 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
e27ec8af1aa4dd726c7c7c366c86fdb36e86def78fbc0421effd00d2cc315d67
BLAKE2b-256 checksum
How to use checksums
dce3949eaea424e54fdecc03f9a317a45186356feee94a667b7de22cc9608868
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.16.0

Release files / seedkit-1.6.0-py3-none-manylinux1_x86_64.manylinux_2_5_x86_64.whl

Download URL seedkit-1.6.0-py3-none-manylinux1_x86_64.manylinux_2_5_x86_64.whl
Size 5.6 MB
Tags Linux glibc 2.5+ x86-64 Python 3
SHA-256 checksum
How to use checksums
e04dcf69c1c75e570bc7ccec3993fcc0557a996a1f383be7042989927575d5e6
BLAKE2b-256 checksum
How to use checksums
e862e9f6724987d0ca6f7acb0981642324e3fdc807d349755d992dfeb4ba1827
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.16.0

Release files / seedkit-1.6.0-py3-none-macosx_11_0_arm64.whl

Download URL seedkit-1.6.0-py3-none-macosx_11_0_arm64.whl
Size 5.0 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
c7c208087e8792a725b29b2022a593848f62ddef5579b56bf3bf0e583d385e1c
BLAKE2b-256 checksum
How to use checksums
e671a707218b29151ee0ac7161e9ac1eb7ca4e1d60302a3bb035741e1d952f5d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.16.0

Release files / seedkit-1.6.0-py3-none-macosx_10_12_x86_64.whl

Download URL seedkit-1.6.0-py3-none-macosx_10_12_x86_64.whl
Size 5.2 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
89720c0eb6e3896b5407bfc470d71161739af89f472faa2efb971906764fc1ef
BLAKE2b-256 checksum
How to use checksums
011dd05f8c84f96b91e506f6b2ac62d1d32011658b11fb6fec80fcaf75aae951
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.16.0

Security for seedkit 1.6.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.

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