🚀 DataForge
Generate realistic synthetic datasets with a simple and powerful API.
DataForge is a modern Python library for generating realistic synthetic datasets for testing, software development, machine learning, education, demonstrations, and AI projects.
✨ Features
- 🚀 Generate thousands of realistic records in seconds
- 📦 15 built-in datasets
- 🛠 Create custom datasets using schemas
- 📊 Returns Pandas DataFrame
- 💾 Export to CSV
- 📄 Export to JSON
- 📗 Export to Excel (.xlsx)
- 🗄 Export to SQLite
- ⚡ Fast and lightweight
- 🌍 Cross-platform
- 🐍 Python 3.10+
📦 Installation
Install from PyPI:
pip install dataforgeplus
Or install from source:
git clone https://github.com/Aatif05-it/DataForge.git
cd DataForge
pip install -e .
🚀 Quick Start
Generate an Employee Dataset
from dataforge import forge
df = forge(
dataset="employee",
rows=10
)
print(df.head())
Example Output
| Name | Department | Salary | |
|---|---|---|---|
| John Smith | john@email.com | IT | 72000 |
| Emma Wilson | emma@email.com | HR | 61000 |
🛠 Custom Dataset
from dataforge import forge
df = forge(
rows=100,
schema={
"name": "name",
"email": "email",
"phone": "phone",
"salary": "salary"
}
)
print(df.head())
📚 Available Datasets
from dataforge import available_datasets
print(available_datasets())
Output
[
'airline',
'banking',
'countries',
'creditcard',
'ecommerce',
'employee',
'hospital',
'hr',
'library',
'mobile',
'realestate',
'restaurant',
'student',
'vehicle',
'weather'
]
💾 Export Examples
CSV
df.to_csv("employees.csv", index=False)
Excel
df.to_excel("employees.xlsx", index=False)
JSON
df.to_json(
"employees.json",
orient="records",
indent=4
)
SQLite
import sqlite3
conn = sqlite3.connect("employees.db")
df.to_sql(
"employees",
conn,
if_exists="replace",
index=False
)
conn.close()
📚 Complete Example
from dataforge import forge
employees = forge(
dataset="employee",
rows=100
)
employees.to_csv("employees.csv", index=False)
print(employees.head())
🏷 Built-in Datasets
- Airline
- Banking
- Countries
- Credit Card
- Ecommerce
- Employee
- Hospital
- HR
- Library
- Mobile
- Real Estate
- Restaurant
- Student
- Vehicle
- Weather
🔧 Supported Providers
Some commonly used providers include:
name
first_name
last_name
email
phone
city
state
country
company
department
salary
gender
uuid
date
price
product
invoice_number
order_id
doctor
student_id
employee_id
vehicle
credit_card
passport_number
pan
aadhaar
📁 Project Structure
DataForge/
│
├── dataforge/
│ ├── __init__.py
│ ├── forge.py
│ ├── cli.py
│ ├── datasets/
│ ├── providers/
│ └── utils/
│
├── docs/
├── examples/
├── tests/
├── LICENSE
├── MANIFEST.in
├── pyproject.toml
├── setup.py
└── README.md
🗺 Roadmap
- ✅ CSV Export
- ✅ JSON Export
- ✅ Excel Export
- ✅ SQLite Export
- 🔜 YAML Schema Support
- 🔜 AI Dataset Generator
- 🔜 PostgreSQL Export
- 🔜 MongoDB Export
- 🔜 Parquet Export
- 🔜 REST API
📋 Requirements
- Python 3.10+
- pandas
- Faker
- openpyxl
📜 License
This project is licensed under the MIT License.
👨💻 Author
Khan Aatif
GitHub
🤝 Contributing
Contributions are welcome.
- Fork the repository.
- Create a feature branch.
- Commit your changes.
- Push to your fork.
- Open a Pull Request.
⭐ Support
If you find DataForge useful, please consider giving the project a ⭐ on GitHub.
Repository:
https://github.com/Aatif05-it/DataForge
📧 Contact
Email:
Metadata
Release files for dataforgeplus 1.0.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 | Provenance | Actions |
|---|---|---|---|---|
| dataforgeplus-1.0.1.tar.gz | 30.5 kB | Without provenance | Details for dataforgeplus-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dataforgeplus-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for dataforgeplus-1.0.1-py3-none-any.whl |
Total release size: 87.2 kB
Release files / dataforgeplus-1.0.1.tar.gz
| Download URL | dataforgeplus-1.0.1.tar.gz |
|---|---|
| Size | 30.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
88e0ad5b6a717d1da869b35ea327ba7ce594ce8010372d3d6d9217141b52d89e
|
|
BLAKE2b-256 checksum How to use checksums |
f9d5926aeff4fb18d810d99296f1f4770175d4f0afbe8d90c80b6c2bb60142f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.4
|
Release files / dataforgeplus-1.0.1-py3-none-any.whl
| Download URL | dataforgeplus-1.0.1-py3-none-any.whl |
|---|---|
| Size | 56.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bf3aa44bea8e68dce80573f61a6336ac9b01866f01602bdd6fc9ec7e5f9811f3
|
|
BLAKE2b-256 checksum How to use checksums |
f5eea85dc7bcab327730fecdb6689c2f0707e3e943fb882aa21eaf42d9f66eb7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.4
|
Security for dataforgeplus 1.0.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.