Skip to main content

A lightweight generator for realistic Indian demographic data based on Census 2011 statistics.

Project description

Indian Fake Data Generator (Python Edition)

A fast, zero-dependency python library that creates realistic mock Indian profile data based on Census 2011 statistics.

Unlike other tools that make impossible combinations (like a Sikh named Mohammed Sharma from Mizoram), this tool links religion, state, caste, gender, and occupation together so the generated people make logical sense.

Python License


What It Can Do

  • Linked Census Data: Correctly links Religion ➔ State ➔ Caste ➔ Gender ➔ Education ➔ Job ➔ Assets.
  • Extra Features: Creates credit and health scores, builds a short text bio, and structures custom LLM Agent Personas.
  • No Dependencies: Built entirely using Python's standard library to keep things extremely fast and lightweight.
  • Deterministic: Generates the exact same profiles for identical seed numbers.

Installation

pip install indian-fakedata

Quick Start

from indian_fakedata import generate, generate_enriched

# 1. Basic Generation
profiles = generate(count=10)

# 2. Enriched Generation (with outcomes, bios, and LLM agent personas)
enriched_profiles = generate_enriched(count=5)

for p in enriched_profiles:
    print(f"Name: {p['fields']['full_name']}")
    print(f"Bio: {p['narrative']}")

Saving Datasets (JSON, JSONL, CSV)

Easily format or write your generated data to standard formats:

from indian_fakedata import generate_enriched, save_profiles

# 1. Generate a list of profiles
profiles = generate_enriched(count=100)

# 2. Save directly to a file (JSON, JSONL, or CSV)
save_profiles(profiles, "./output/data.json", "json")
save_profiles(profiles, "./output/data.jsonl", "jsonl")
save_profiles(profiles, "./output/data.csv", "csv") # Automatically flattens outcomes/personas

License

MIT © Abhay Mourya

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

indian_fakedata-1.0.0.tar.gz (125.0 kB view details)

Uploaded Source

Built Distribution

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

indian_fakedata-1.0.0-py3-none-any.whl (134.3 kB view details)

Uploaded Python 3

File details

Details for the file indian_fakedata-1.0.0.tar.gz.

File metadata

  • Download URL: indian_fakedata-1.0.0.tar.gz
  • Upload date:
  • Size: 125.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for indian_fakedata-1.0.0.tar.gz
Algorithm Hash digest
SHA256 7b117f042a3019f288dc03961e3888cda69b99ce8e7c883e648fb1e54bc801ec
MD5 df34165236724a510cabd7382950ca25
BLAKE2b-256 46a478a124d6955921dd1736e9dd838e9f728a03c149fa69519a35addcdfb38d

See more details on using hashes here.

File details

Details for the file indian_fakedata-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: indian_fakedata-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 134.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for indian_fakedata-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 896f0cd74cea62d774530df8e84289000b7b637f3a6b343db157f6d9f131a4b5
MD5 ca16a2304479f61b662caba5f44a5f89
BLAKE2b-256 5a977b36c8cf6e5d8654bafbcb08b66621456409b1d948f8c8479b3d9a94ec68

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