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, and demonstrations.
โจ Features
- ๐ Generate thousands of records in seconds
- ๐ฆ 15 Built-in datasets
- ๐ Custom schema support
- ๐ Returns Pandas DataFrame
- ๐พ Export to CSV
- ๐ Export to JSON
- ๐ Export to Excel (.xlsx)
- ๐ Export to SQLite
- โก Fast and lightweight
- ๐ Cross-platform
๐ฆ 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
Built-in Dataset
from dataforge import forge
df = forge(
dataset="employee",
rows=10
)
print(df.head())
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 CSV
df.to_csv("users.csv", index=False)
Export Excel
df.to_excel("users.xlsx", index=False)
Export JSON
df.to_json("users.json", orient="records", indent=4)
Export SQLite
import sqlite3
conn = sqlite3.connect("users.db")
df.to_sql("users", conn, if_exists="replace", index=False)
conn.close()
Example Providers
name
email
phone
city
state
country
salary
company
uuid
gender
date
department
Project Structure
DataForge/
โ
โโโ dataforge/
โ โโโ __init__.py
โ โโโ forge.py
โ โโโ cli.py
โ โโโ providers/
โ โโโ datasets/
โ โโโ utils/
โ
โโโ docs/
โโโ examples/
โโโ tests/
โโโ README.md
โโโ LICENSE
โโโ MANIFEST.in
โโโ pyproject.toml
โโโ setup.py
Roadmap
- โ CSV Export
- โ JSON Export
- โ Excel Export
- โ SQLite Export
- ๐ YAML Schema Support
- ๐ CLI Improvements
- ๐ AI Dataset Generator
- ๐ PostgreSQL Export
- ๐ MongoDB Export
- ๐ Parquet Export
Requirements
- Python 3.10+
- Pandas
- Faker
- OpenPyXL
License
This project is licensed under the MIT License.
Author
Khan Aatif
GitHub: https://github.com/Aatif05-it
Contributing
Contributions, bug reports, and feature requests are welcome.
- Fork the repository.
- Create a new branch.
- Commit your changes.
- Open a Pull Request.
โญ Support
If you find DataForge useful, please consider giving the repository a โญ on GitHub:
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.0.tar.gz.
File metadata
- Download URL: dataforgeplus-1.0.0.tar.gz
- Upload date:
- Size: 29.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19e55d1997bc70405ed3557cac7860ddb62376577e99301a7f1b7a80438d4aa3
|
|
| MD5 |
fb92ec4a35c24583f7e493db41803df9
|
|
| BLAKE2b-256 |
a9167a21c8c32340342a2d4ee0fb1bbf527d8daec18c2d9ee61076e74edf27c1
|
File details
Details for the file dataforgeplus-1.0.0-py3-none-any.whl.
File metadata
- Download URL: dataforgeplus-1.0.0-py3-none-any.whl
- Upload date:
- Size: 56.3 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 |
133e446e0e06162d27bcc1f0cfe7c93d24ecfad68e7deff7af5752113567aa6a
|
|
| MD5 |
47f64b0831b9a1a04de09ac22d2ab857
|
|
| BLAKE2b-256 |
f80790247938e3bdbb9160c98a23354bde409e5f7e11261827bf6965d9404dca
|