Synthetic Data Generator#

Python Faker Pandas JSON Postman

Overview#

A Python tool for generating realistic fake shareholder data at scale. Designed for API testing and prototyping workflows, the tool produces configurable datasets in CSV and JSON formats, suitable for use with tools like Postman.

Sample Output#

CSV Output (shareholder_data_name_id_1000.csv)
name,shareholder_id,email,address,phone
John Smith,SH-001,jsmith@example.com,"123 Main St, Portland OR",503-555-0142
Jane Doe,SH-002,jdoe@example.com,"456 Oak Ave, Salem OR",503-555-0198
...
JSON Output (Postman-compatible)
[
  {
    "name": "John Smith",
    "shareholder_id": "SH-001",
    "email": "jsmith@example.com",
    "address": "123 Main St, Portland OR",
    "phone": "503-555-0142"
  }
]

Key Features#

  • Generate datasets from 1,000 to 10,000+ records

  • Output to CSV and JSON formats

  • Postman-compatible JSON for API testing

  • Realistic names, addresses, emails, and phone numbers via the Faker library

  • Reproducible results with seed control

Code Highlights#

from faker import Faker
import pandas as pd

fake = Faker()

def generate_shareholders(n=1000):
    """Generate n fake shareholder records."""
    data = []
    for i in range(n):
        data.append({
            'name': fake.name(),
            'shareholder_id': f'SH-{i+1:04d}',
            'email': fake.email(),
            'address': fake.address(),
            'phone': fake.phone_number()
        })
    return pd.DataFrame(data)

Technologies#

Category

Tools

Data Generation

Faker

Data Processing

Pandas

Output Formats

CSV, JSON

API Testing

Postman

View on GitHub