Skip to main content

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.

  1. Fork the repository.
  2. Create a new branch.
  3. Commit your changes.
  4. Open a Pull Request.

โญ Support

If you find DataForge useful, please consider giving the repository a โญ on GitHub:

https://github.com/Aatif05-it/DataForge

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dataforgeplus-1.0.0.tar.gz (29.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dataforgeplus-1.0.0-py3-none-any.whl (56.3 kB view details)

Uploaded Python 3

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

Hashes for dataforgeplus-1.0.0.tar.gz
Algorithm Hash digest
SHA256 19e55d1997bc70405ed3557cac7860ddb62376577e99301a7f1b7a80438d4aa3
MD5 fb92ec4a35c24583f7e493db41803df9
BLAKE2b-256 a9167a21c8c32340342a2d4ee0fb1bbf527d8daec18c2d9ee61076e74edf27c1

See more details on using hashes here.

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

Hashes for dataforgeplus-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 133e446e0e06162d27bcc1f0cfe7c93d24ecfad68e7deff7af5752113567aa6a
MD5 47f64b0831b9a1a04de09ac22d2ab857
BLAKE2b-256 f80790247938e3bdbb9160c98a23354bde409e5f7e11261827bf6965d9404dca

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page