Generate realistic synthetic datasets with a simple and powerful API.
DataForge is a modern Python library for generating realistic fake datasets for testing, machine learning, software development, education, and demonstrations.
- Generate thousands of records in seconds
- Simple and intuitive API
- Export to CSV
- Export to JSON
- Export to Excel (.xlsx)
- Export to SQLite
- Custom schemas
- Built on top of Pandas
- Cross-platform
pip install dataforgeOr install locally
git clone https://github.com/yourusername/DataForge.git
cd DataForge
pip install -e .from dataforge import forge
df = forge(
rows=100,
schema={
"name": "name",
"email": "email",
"phone": "phone",
"salary": "salary"
}
)
print(df.head())| Name | Phone | Salary | |
|---|---|---|---|
| John Smith | john@example.com | +1 555-1234 | 65000 |
| Alice Brown | alice@test.com | +1 555-5678 | 72000 |
from dataforge import forge
df = forge(
rows=500,
schema={
"name":"name",
"email":"email"
}
)
df.to_csv("users.csv", index=False)df.to_excel("users.xlsx", index=False)df.to_json("users.json")- CSV Export
- JSON Export
- Excel Export
- SQLite Export
- YAML Schema
- REST API
- CLI Tool
- AI Dataset Generator
- PostgreSQL Export
- MongoDB Export
DataForge/
│
├── dataforge/
├── examples/
├── tests/
├── docs/
├── README.md
├── setup.py
└── pyproject.toml
- Python 3.10+
- Pandas
- Faker
- OpenPyXL
MIT License
Khan Aatif
Pull requests are welcome.
If you find bugs or have feature requests, please open an issue.