Skip to main content

Generate realistic test data for your databases. Schema-aware, relationship-preserving, privacy-safe.

Project description

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.

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, pull schema|data, 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 a freshly seeded dataset is one fixture away:

def test_orders(seeded_data):
    assert seeded_data  # deterministic test data pulled from the platform

Configure via env (SEEDBASE_TOKEN, SEEDBASE_PROJECT, SEEDBASE_SEED) or pytest.ini.

Links

MIT licensed.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

seedbase-0.1.0.tar.gz (28.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

seedbase-0.1.0-py3-none-any.whl (30.4 kB view details)

Uploaded Python 3

File details

Details for the file seedbase-0.1.0.tar.gz.

File metadata

  • Download URL: seedbase-0.1.0.tar.gz
  • Upload date:
  • Size: 28.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for seedbase-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6b849c0b59144f2e654dd937c6413357e0935814bed2bb476519aff92f8214d9
MD5 48b19084025c1ce5a7bb52df8173223b
BLAKE2b-256 4de185db846f8bedc81643f94c838a4abf8b5e418313809265eb0e2eef59473e

See more details on using hashes here.

File details

Details for the file seedbase-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: seedbase-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 30.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for seedbase-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fcbb423742367b658900f8003032391017e1daf46ce8bc1c8443f2da5982f1c3
MD5 f17d214b2ff524a93bf7a31ad3e792a9
BLAKE2b-256 f9ec255345cdeb159a9181bf5b02394a3d4127f554da61006ca803b1093e772b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page