A powerful Python package for generating realistic fake data with 6 pre-built templates - perfect for testing, development, and prototyping
Project description
🎲 OJT Data Generator
A powerful and easy-to-use Python package for generating realistic fake data for testing, development, and prototyping. Built with Python's Faker library and Pandas, OJT Data Generator provides an interactive command-line interface and programmatic API to quickly generate structured datasets for various use cases.
🎯 Why OJT Data Generator?
Whether you're building a new application, testing database schemas, creating demos, or learning data analysis, you need realistic sample data. OJT Data Generator makes this process effortless by providing:
- Pre-built Templates: 6 ready-to-use data templates covering common use cases
- Interactive CLI: User-friendly command-line interface requiring no coding
- Programmatic API: Import and use in your Python scripts for automation
- Reproducible Data: Set seeds to generate consistent datasets
- Export Ready: Save generated data directly to CSV files
- Pandas Integration: Data returned as pandas DataFrames for easy manipulation
✨ Features
Generate realistic fake data with 6 pre-built templates:
- 👤 User Data - Full name, username, email, phone number, gender, date of birth
- 💼 Employee Data - Full name, employee ID, company email, department, salary
- 🎓 Student Data - Full name, student ID, GPA, academic year
- 📦 Product Data - Product name, price, stock quantity
- 🏦 Bank Account Data - Account number, account holder, balance
- 🏥 Patient Data - Full name, patient ID, height (cm), weight (kg)
📦 Installation
pip install ojt-data-generator
🚀 Quick Start
After installation, simply run the interactive CLI:
ojt
The tool will guide you through:
- Selecting a data template
- Choosing the number of rows to generate
- Optionally setting a seed for reproducible data
- Viewing the generated data
- Saving to CSV if needed
💡 Example Usage
$ ojt
Select a template:
1. User
2. Employee
3. Student
4. Product
5. Bank Account
6. Patient
Enter template number: 1
Number of rows (default 1): 5
Seed (optional): 42
# Generated data will be displayed as a pandas DataFrame
# Option to save as CSV file
🔧 Use as a Library
You can also import and use OJT in your Python scripts for automation:
from ojt import generate_data, TEMPLATE_NAMES
import pandas as pd
# Generate 10 user records with a seed for reproducibility
data = generate_data(template_number=1, n_rows=10, seed=42)
df = pd.DataFrame(data)
print(df)
# Save to CSV
df.to_csv('users.csv', index=False)
# Generate employee data
employee_data = generate_data(template_number=2, n_rows=50)
employees_df = pd.DataFrame(employee_data)
# Generate student data for testing
student_data = generate_data(template_number=3, n_rows=100, seed=123)
students_df = pd.DataFrame(student_data)
📊 Template Details
1. User Template
Perfect for user registration, authentication systems, and social platforms.
- Full Name
- Username
- Email Address
- Phone Number
- Gender (male/female/other)
- Date of Birth (ISO format)
2. Employee Template
Ideal for HR systems, payroll applications, and organizational databases.
- Full Name
- Employee ID (8-character UUID)
- Company Email
- Department (HR/Engineering/Sales)
- Salary ($30,000 - $120,000)
3. Student Template
Great for educational platforms, learning management systems, and academic tools.
- Full Name
- Student ID (5-digit number)
- GPA (2.0 - 4.0)
- Academic Year (1-4)
4. Product Template
Useful for e-commerce platforms, inventory systems, and retail applications.
- Product Name
- Price ($100 - $5,000)
- Stock Quantity (0-1,000 units)
5. Bank Account Template
Perfect for financial applications, banking systems, and payment platforms.
- Account Number (8-digit)
- Account Holder Name
- Balance ($0 - $1,000,000)
6. Patient Template
Designed for healthcare applications, medical records, and health tracking systems.
- Full Name
- Patient ID (8-character UUID)
- Height (50-200 cm)
- Weight (3-150 kg)
🎓 Use Cases
- Software Testing: Generate test data for unit tests, integration tests, and QA
- Database Seeding: Populate development and staging databases
- Demos & Presentations: Create realistic demo data for product showcases
- Learning & Training: Practice data analysis, SQL queries, and data visualization
- Prototyping: Quickly mock up applications with realistic data
- API Testing: Generate payloads for API endpoint testing
📋 Requirements
- Python >= 3.7
- faker >= 18.0.0
- pandas >= 1.3.0
🤝 Contributing
Contributions are welcome! Feel free to open issues or submit pull requests.
📄 License
MIT License - see LICENSE file for details
👨💻 Author
Kushal Kotiny
🔗 Links
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 ojt_data_generator-0.1.1.tar.gz.
File metadata
- Download URL: ojt_data_generator-0.1.1.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5908acb2a0c530a0d67e56342bd4c5593b7b09d57bc4e18db8e06418b9645a98
|
|
| MD5 |
da3d5a0c6ecd5cd40f4f31185f255a9b
|
|
| BLAKE2b-256 |
a80c03e68ef162f164cdcfb704ea494935f13b01866b4f17bea6801e8ab8ea99
|
File details
Details for the file ojt_data_generator-0.1.1-py3-none-any.whl.
File metadata
- Download URL: ojt_data_generator-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9dcab7a35d20258bbd9ee532252143bef439c0c0cb0895ae6322a78427ec4120
|
|
| MD5 |
281781d7a7646d36b0da03aff61ee6eb
|
|
| BLAKE2b-256 |
57581f2757b10c9d42fb4ef8dcbcf0a0c8f01e49dc06a9cb864a0ba12687a25c
|