Metadata-Version: 2.2
Name: python-mockpy
Version: 0.1.0
Summary: Comprehensive realistic data generation library for testing and development
Home-page: https://github.com/burakozcn01/mockpy
Author: Reloading
Author-email: reloading001@hotmail.com
Project-URL: Bug Reports, https://github.com/burakozcn01/mockpy/issues
Project-URL: Source, https://github.com/burakozcn01/mockpy
Keywords: mock,fake,data,testing,development,faker,generator,test data,random data,dummy data,sample data
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Software Development :: Testing
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE.md
Provides-Extra: full
Requires-Dist: translators; extra == "full"
Requires-Dist: jsonschema; extra == "full"
Requires-Dist: django; extra == "full"
Requires-Dist: flask; extra == "full"
Requires-Dist: sqlalchemy; extra == "full"
Requires-Dist: pydantic; extra == "full"
Provides-Extra: translate
Requires-Dist: translators; extra == "translate"
Provides-Extra: jsonschema
Requires-Dist: jsonschema; extra == "jsonschema"
Provides-Extra: django
Requires-Dist: django; extra == "django"
Provides-Extra: flask
Requires-Dist: flask; extra == "flask"
Provides-Extra: sqlalchemy
Requires-Dist: sqlalchemy; extra == "sqlalchemy"
Provides-Extra: fastapi
Requires-Dist: fastapi; extra == "fastapi"
Requires-Dist: pydantic; extra == "fastapi"
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: black; extra == "dev"
Requires-Dist: isort; extra == "dev"
Requires-Dist: flake8; extra == "dev"
Requires-Dist: pylint; extra == "dev"
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: project-url
Dynamic: provides-extra
Dynamic: requires-python
Dynamic: summary

# MockPy

🚀 Comprehensive Realistic Data Generation Library

[![PyPI version](https://img.shields.io/badge/pypi-0.1.0-blue.svg)](https://pypi.org/project/mockpy/)
[![Python versions](https://img.shields.io/badge/python-3.7%2B-brightgreen.svg)](https://www.python.org/downloads/)
[![License](https://img.shields.io/badge/license-MIT-green.svg)](https://opensource.org/licenses/MIT)

MockPy is a Python library for generating realistic and comprehensive mock data for testing, development, and demonstration purposes.

## 🌟 Features

- 📊 **Realistic Data**: Based on real-world distributions
- 🔄 **Cross-Data Consistency**: Related data fields maintain logical relationships
- 🧩 **Easy-to-Use API**: Intuitive design for developer productivity
- 🔌 **Framework Integration**: Works with Django, Flask, FastAPI, SQLAlchemy
- 🚀 **Performance Optimized**: Fast generation with minimal resource usage
- 🌍 **Multi-Language Support**: Built-in support for English and Turkish with translation capabilities

## 📦 Installation

```bash
pip install python-mockpy
```

## 🚀 Quick Start

```python
from mockpy import MockPy

# Initialize the library
mock = MockPy(locale="en_US")

# Generate a person
person = mock.person.person()
print(f"Hello, my name is {person.full_name}")

# Generate an address
address = mock.address.address()
print(f"My address: {address.street}, {address.city}")

# Generate credit card
credit_card = mock.finance.credit_card()
print(f"My card: {credit_card.formatted_number}")
```

## 📋 Data Types

MockPy can generate a wide variety of data:

- 👤 **Personal Information**: Names, addresses, phone numbers, emails
- 💼 **Business Data**: Company names, job titles, departments
- 💰 **Financial Data**: Bank accounts, credit cards, IBAN numbers
- 🌐 **Internet**: URLs, IP addresses, usernames
- 🏥 **Healthcare**: Patient records, diagnoses, medication names
- 🗺️ **Geographic**: GPS coordinates, countries, cities
- 🛒 **E-commerce**: Products, prices, orders
- 📚 **Education**: Schools, courses, grades

And many more!

## 🛠️ Advanced Usage

### Schema-Based Data Generation

```python
schema = {
    "id": {"type": "integer", "min": 1000, "max": 9999},
    "user": "person.person",
    "subscription": {
        "plan": {"type": "choice", "choices": ["Basic", "Premium", "Enterprise"]},
        "start_date": {"type": "date", "start": "2022-01-01", "end": "2023-01-01"},
        "price": {"type": "float", "min": 9.99, "max": 99.99, "precision": 2},
    }
}

# Generate 100 records
dataset = mock.generate_dataset(schema, count=100)
```

### JSON Schema/OpenAPI Integration

```python
# Generate data from JSON Schema
from mockpy.integrations import from_json_schema

schema_file = "user_schema.json"
users = from_json_schema(schema_file, count=50)
```

### Django Integration

```python
from mockpy.integrations.django import generate_model_instances
from myapp.models import User

# Create 10 instances of your Django model
users = generate_model_instances(User, count=10)
```

## 🌍 Multi-Language Support

```python
# English data generation
en_mock = MockPy(locale="en_US")
en_person = en_mock.person.person()

# Turkish data generation
tr_mock = MockPy(locale="tr_TR")
tr_person = tr_mock.person.person()

# Other languages (requires 'translators' package)
fr_mock = MockPy(locale="fr_FR")
fr_person = fr_mock.person.person()
```

## 🧪 Testing Use Cases

```python
def test_user_registration():
    mock = MockPy()
    test_user = mock.person.person()
    
    response = client.post('/register', data={
        'email': test_user.email,
        'name': test_user.full_name,
        'phone': test_user.phone
    })
    
    assert response.status_code == 200
```

## 🔧 Performance Considerations

MockPy is designed to be fast and resource-efficient:

- No external dependencies required for core functionality
- Minimal memory footprint
- Optimized for bulk data generation
- Smart caching for frequently used data

## 🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

1. Fork the repository
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request

## 📄 License

Distributed under the MIT License. See `LICENSE` for more information.

## 💬 Contact

Project Link: [https://github.com/burakozcn01/mockpy](https://github.com/burakozcn01/mockpy)
