dbseed
Auto-generate fake data for SQLAlchemy models — zero config
The Problem
Every project needs test data. You either write tedious factory code or install heavy libraries like Faker. For most cases, you just want 100 rows of realistic-looking data.
The Solution
pip install dbseed
from dbseed import seed
users = seed(User, SeedConfig(count=100))
session.add_all(users)
await session.commit()
# Done. 100 users with realistic names, emails, ages.
dbseed inspects your SQLAlchemy model and automatically generates the right kind of data for each column.
Smart Field Detection
| Column name contains | Generated data |
|---|---|
email |
kzmpqwer@example.com |
name |
Alice Johnson |
password, hash |
Random 64-char string |
description, bio |
Lorem ipsum text |
url, link |
https://example.com/word |
phone |
+12345678901 |
String type |
Random alphanumeric |
Integer type |
Random 0-10000 |
Float type |
Random 0.0-10000.0 |
Boolean type |
Random True/False |
DateTime type |
Random date within last 30 days |
Override Specific Fields
from dbseed import seed, SeedConfig
users = seed(User, SeedConfig(
count=50,
overrides={
"role": "admin", # static value
"age": lambda: random.randint(18, 65), # dynamic callable
},
))
Features
- Inspects SQLAlchemy model columns automatically
- Smart name-based field detection (email, name, url, etc.)
- Type-based fallback for unknown fields
- Field overrides (static values or callables)
- Skips primary keys and server-default columns
- No external dependencies beyond SQLAlchemy
- Works with SQLAlchemy 2.0 mapped columns
License
MIT
Release files for dbseed 0.1.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 | |
|---|---|---|---|
| dbseed-0.1.0.tar.gz | 4.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dbseed-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.5 kB
Release files / dbseed-0.1.0.tar.gz
| Download URL | dbseed-0.1.0.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
48f24b2b42579ed008c8f50c040bab44f98cb5c9f47ee6e318245a8365432bc7
|
|
BLAKE2b-256 checksum How to use checksums |
96ed093a2f15302d91ef88befb463f92df7ce975a1a5fbe68396e0d98aa80d1e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / dbseed-0.1.0-py3-none-any.whl
| Download URL | dbseed-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ad24ab583d7f28fac502e49fd07d89fe14bd88cab0929494bb8f35c59073507c
|
|
BLAKE2b-256 checksum How to use checksums |
12e28446b4f3a5f70eed87aa5e7382de73180814898f49cb8f5f52c26930e9b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|