Generate realistic synthetic datasets with a simple and powerful API.
Project description
๐ 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:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dataforgeplus-1.0.1.tar.gz.
File metadata
- Download URL: dataforgeplus-1.0.1.tar.gz
- Upload date:
- Size: 30.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
88e0ad5b6a717d1da869b35ea327ba7ce594ce8010372d3d6d9217141b52d89e
|
|
| MD5 |
955da85cfd96df3d1f9d1a18f0c66322
|
|
| BLAKE2b-256 |
f9d5926aeff4fb18d810d99296f1f4770175d4f0afbe8d90c80b6c2bb60142f0
|
File details
Details for the file dataforgeplus-1.0.1-py3-none-any.whl.
File metadata
- Download URL: dataforgeplus-1.0.1-py3-none-any.whl
- Upload date:
- Size: 56.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf3aa44bea8e68dce80573f61a6336ac9b01866f01602bdd6fc9ec7e5f9811f3
|
|
| MD5 |
fba73cd80ccb6a304007daa0538374d9
|
|
| BLAKE2b-256 |
f5eea85dc7bcab327730fecdb6689c2f0707e3e943fb882aa21eaf42d9f66eb7
|