Fakestack¶
Generate realistic fake data and populate databases with ease¶
-
Python
-
Node.js
-
Homebrew
-
CLI
Why Fakestack?¶
-
High Performance
Go-powered core for blazing fast data generation. Generate millions of records in seconds.
-
Multi-Database
Full support for SQLite, MySQL, and PostgreSQL with automatic schema creation.
-
50+ Generators
Comprehensive data generators for names, emails, addresses, dates, and much more.
-
Smart Relations
Automatic foreign key handling with realistic data relationships.
-
Multi-Language
Use from Python, Node.js, CLI, or directly as a Go library.
-
Zero Dependencies
Self-contained with pre-built binaries. No external dependencies required.
Quick Example¶
from fakestack import Fakestack
schema = {
"database": {
"dbtype": "sqlite",
"drivername": "sqlite",
"database": "users.db"
},
"tables": [
{
"name": "users",
"columns": [
{"name": "id", "type": "integer",
"options": {"primary_key": true, "autoincrement": true}},
{"name": "name", "type": {"name": "string", "args": {"length": 100}},
"options": {"nullable": false}},
{"name": "email", "type": {"name": "string", "args": {"length": 100}},
"options": {"nullable": false, "unique": true}}
],
"indexes": []
}
],
"populate": [
{
"name": "users",
"count": 1000,
"fields": [
{"name": "name", "generator": "name"},
{"name": "email", "generator": "email"}
]
}
]
}
faker = Fakestack(schema)
faker.run()
# ✓ Database created with 1000 users!
const Fakestack = require('fakestack');
const schema = {
database: {
dbtype: 'sqlite',
drivername: 'sqlite',
database: 'users.db'
},
tables: [
{
name: 'users',
columns: [
{name: 'id', type: 'integer',
options: {primary_key: true, autoincrement: true}},
{name: 'name', type: {name: 'string', args: {length: 100}},
options: {nullable: false}},
{name: 'email', type: {name: 'string', args: {length: 100}},
options: {nullable: false, unique: true}}
],
indexes: []
}
],
populate: [
{
name: 'users',
count: 1000,
fields: [
{name: 'name', generator: 'name'},
{name: 'email', generator: 'email'}
]
}
]
};
const faker = new Fakestack(schema);
await faker.run();
// ✓ Database created with 1000 users!
Explore Documentation¶
-
Getting Started
Learn the basics and create your first database in minutes.
-
Schema Reference
Complete guide to JSON schema format and configuration.
-
Data Generators
Browse all 50+ available data generators with examples.
-
Database Support
Setup guides for SQLite, MySQL, and PostgreSQL.
-
API Reference
Complete Python and Node.js API documentation.
-
Examples
Real-world schemas for e-commerce, blogs, and more.