Seedbase
Generate realistic, relationship-preserving, privacy-safe test data for your databases, and pull it straight into your local or CI database.
Seedbase lives on seedba.se: you model (or import) a schema there, generate datasets, and use this package to pull them into Postgres, MySQL, SQLite and more. Schema-aware, foreign-key-correct, reproducible by seed.
Create a free account at seedba.se/register, no credit card. The free tier is enough to generate full, foreign-key-consistent datasets.
Install
pip install seedbase
Zero dependencies, pure Python (3.10+).
CLI quickstart
seedbase login # opens the browser, stores a token
seedbase init # creates .seedbase.json (project + target DB)
seedbase generate --seed 42 # trigger a generation on the platform
seedbase pull all # write schema + data into your target DB
The CLI is pull-oriented: schema and datasets live on the platform, you pull them into your database. Other commands: projects, generations, connections, pull schema|data|subset, mask, db-push, diff, export config, import config.
Python SDK
from seedbase import SeedbaseClient
client = SeedbaseClient(token="dr_sk_...") # or from ~/.seedbase/config.json
gen = client.generate(project_id, seed=42, wait=True)
data = client.download(gen["id"], fmt="sql")
pytest fixtures
Seedbase ships a pytest plugin, so realistic, foreign-key-consistent test data is one fixture away. pytest fixtures are dependency injection, so this is your test data, injected.
Inject a populated test database (the headline). The target database needs its schema already migrated; SeedBase fills it with FK-consistent data and cleans up after the session. Needs SQLAlchemy 2.0 (pip install "seedbase[database]"):
import sqlalchemy
def test_pagination(seeded_database):
# seeded_database is a live connection to a DB full of realistic data
rows = seeded_database.execute(
sqlalchemy.text("SELECT email FROM users LIMIT 5")
).fetchall()
assert all("@" in email for (email,) in rows)
Inject the rows directly (no database, no driver):
def test_user_shape(seeded_rows):
# {table_name: [row_dict, ...]}, in foreign-key-safe order
assert seeded_rows["users"][0]["email"]
Raw bytes (SQL/CSV/JSON dump) if you want to load it yourself:
def test_dump(seeded_data):
assert seeded_data
Deterministic per seed, so the same seed gives the same data and your tests are reproducible. Configure via env (SEEDBASE_TOKEN, SEEDBASE_PROJECT, SEEDBASE_SEED, SEEDBASE_TEST_DATABASE_URL) or pytest.ini (seedbase_project, seedbase_seed, seedbase_rows, seedbase_database_url). All fixtures skip with a helpful message if the project or credentials are missing, so they never break a suite that has not configured them.
Links
- Website: https://seedba.se
- Docs: https://seedba.se/docs
- API keys: https://seedba.se/settings?tab=api-keys
MIT licensed.
Release files for seedbase 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| seedbase-0.2.1.tar.gz | 34.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| seedbase-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 71.7 kB
Release files / seedbase-0.2.1.tar.gz
| Download URL | seedbase-0.2.1.tar.gz |
|---|---|
| Size | 34.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7cea02be2d33da2a09a4f0490119929d71727c156990c813da0950d365401532
|
|
BLAKE2b-256 checksum How to use checksums |
9380cae321ae6c8a57d7574b7c3a9a9b3a2b8c2f9cf5d39c97c01287ae99b117
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 22, 2026.
Transparency logRelease files / seedbase-0.2.1-py3-none-any.whl
| Download URL | seedbase-0.2.1-py3-none-any.whl |
|---|---|
| Size | 37.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f0af14b98886b23cfd92b27096cc6ef3be26ef79bc1710b9310c7bbdd495929a
|
|
BLAKE2b-256 checksum How to use checksums |
97b578ed4ef7d5bc406734bed255f5b5601709a336e68494838f0aded0e4a081
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 22, 2026.
Transparency log