{"slug": "stop-generating-nonsense-indian-mock-data-i-built-a-better-way", "title": "Stop Generating Nonsense Indian Mock Data. I Built a Better Way!", "summary": "A developer built 'indian-fakedata', a Python library that generates realistic Indian demographic data by ensuring consistent combinations of names, religions, states, and other attributes. The tool addresses the problem of standard mock-data generators producing impossible profiles like a Sikh person named Mohammed Sharma living in Mizoram. The library provides detailed profiles including Aadhaar numbers, PAN numbers, and cultural data for testing and ML training.", "body_md": "If you build apps for the Indian market, you've probably needed mock demographic data for testing, UI previews, or training ML models.\n\nAnd if you've used standard mock-data generators, you've probably ended up with a profile that looks something like this: **A Sikh person named Mohammed Sharma living in Mizoram.** 😅\n\nMost fake-data libraries generate impossible demographic combinations because they operate on simple random selection. They pick a first name from list A, a last name from list B, a religion from list C, and a state from list D.\n\nWhen context matters, that bad data can ruin your testing environment. That’s why I built `indian-fakedata`\n\n.\n\n```\n{\n  \"id\": \"33553413-2014-4616-9361-511204427271\",\n  \"firstName\": \"Pushpa\",\n  \"lastName\": \"Sharma\",\n  \"fatherName\": \"Santosh Sharma\",\n  \"motherName\": \"Geeta Sharma\",\n  \"spouseName\": \"Sanjay Sharma\",\n  \"gender\": \"female\",\n  \"age\": 34,\n  \"dateOfBirth\": \"1992-06-11\",\n  \"bloodGroup\": \"O+\",\n  \"heightCm\": 152.9,\n  \"weightKg\": 65.9,\n  \"bmi\": 28.2,\n  \"aadhaarNumber\": \"500233102039\",\n  \"panNumber\": \"EKIPS1361G\",\n  \"voterIdNumber\": \"MHR3140140\",\n  \"phoneNumber\": \"7513110431\",\n  \"email\": \"pushpasharma328@gmail.com\",\n  \"state\": \"Maharashtra\",\n  \"stateCode\": \"MH\",\n  \"district\": \"Aurangabad\",\n  \"areaType\": \"urban\",\n  \"addressLine\": \"469/A, Adarsh Colony, Aurangabad\",\n  \"locality\": \"Adarsh Colony\",\n  \"pinCode\": \"418683\",\n  \"religion\": \"Hindu\",\n  \"caste\": \"Deshastha Brahmin\",\n  \"socialCategory\": \"General\",\n  \"motherTongue\": \"Marathi\",\n  \"secondLanguage\": \"English\",\n  \"education\": \"secondary\",\n  \"occupation\": \"agricultural_labourer\",\n  \"employmentSector\": \"self_employed\",\n  \"maritalStatus\": \"married\",\n  \"annualIncomeINR\": 194000,\n  \"monthlyExpenditureINR\": 15300,\n  \"numberOfChildren\": 1,\n  \"dietaryPreference\": \"non_vegetarian\",\n  \"disability\": \"none\",\n  \"isMigrant\": true,\n  \"migrationOriginState\": \"Kerala\",\n  \"bankIFSC\": \"PUNB0314300\",\n  \"bankName\": \"Punjab National Bank\",\n  \"bankAccountNumber\": \"03131130413\",\n  \"rationCardType\": \"APL\",\n  \"healthInsurance\": \"none\",\n  \"landOwnershipAcres\": 0,\n  \"vehicleRegistration\": \"MH 01 BG 3908\",\n  \"vehicleType\": \"four_wheeler\",\n  \"hasInternetAccess\": true,\n  \"hasSmartphone\": true,\n  \"usesSocialMedia\": true,\n  \"upiId\": \"pushpa@okicici\",\n  \"personality\": {\n    \"openness\": 53,\n    \"conscientiousness\": 47,\n    \"extraversion\": 53,\n    \"agreeableness\": 46,\n    \"neuroticism\": 74\n  },\n  \"politicalLeaning\": \"nationalist_right\",\n  \"religiosity\": \"very_religious\",\n  \"cognitiveProfile\": {\n    \"aptitudeScore\": 40,\n    \"numeracyScore\": 37,\n    \"literacyScore\": 75,\n    \"digitalLiteracyScore\": 45,\n    \"financialLiteracyScore\": 93\n  },\n  \"interests\": {\n    \"primarySport\": \"cricket\",\n    \"petPreference\": \"fish\",\n    \"entertainment\": [\n      \"Bollywood\", \"TV Serials\", \"Cricket Matches\", \"News\",\n      \"YouTube\", \"OTT/Netflix\", \"Devotional Music\"\n    ],\n    \"readingHabit\": \"rare\",\n    \"musicPreference\": \"Bollywood\",\n    \"preferredSocialMedia\": \"WhatsApp\"\n  },\n  \"habits\": {\n    \"tobaccoUse\": \"none\",\n    \"alcoholUse\": \"none\",\n    \"exerciseFrequency\": \"weekly\",\n    \"avgSleepHours\": 9.3,\n    \"cooksAtHome\": true,\n    \"chronotype\": \"early_riser\"\n  },\n  \"educationDetails\": {\n    \"fieldOfStudy\": null,\n    \"institutionType\": \"private\",\n    \"mediumOfInstruction\": \"English\",\n    \"qualificationYear\": 2008,\n    \"competitiveExamPercentile\": null\n  },\n  \"culturalProfile\": {\n    \"entrepreneurialScore\": 32,\n    \"academicOrientation\": 64,\n    \"artisticInclination\": 41,\n    \"militaryTradition\": 37,\n    \"agriculturalRootedness\": 21,\n    \"artisanTradition\": 1,\n    \"bureaucraticOrientation\": 50,\n    \"socialActivism\": 13,\n    \"communityBonding\": 67,\n    \"migrationTendency\": 24,\n    \"careerPreference\": \"business_trade\",\n    \"familyStructure\": \"nuclear_family\",\n    \"savingsOrientation\": 65,\n    \"riskAppetite\": 12\n  },\n  \"householdSize\": 1,\n  \"householdAssets\": {\n    \"hasRadioTransistor\": false,\n    \"hasTelevision\": true,\n    \"hasComputer\": true,\n    \"hasPhone\": true,\n    \"hasBicycle\": true,\n    \"hasScooter\": true,\n    \"hasCar\": true,\n    \"bankingService\": true,\n    \"treatedWaterSource\": true,\n    \"latrineFacility\": true,\n    \"numberOfRooms\": 2,\n    \"roofMaterial\": \"concrete\",\n    \"wallMaterial\": \"burnt_brick\",\n    \"cookingFuel\": \"lpg\",\n    \"lightingSource\": \"electricity\",\n    \"drinkingWaterSource\": \"tap_treated\"\n  },\n  \"probabilityMetrics\": {\n    \"nationalReligionFreq\": 0.8033,\n    \"stateGivenReligionProb\": 0.1032,\n    \"casteGivenContextProb\": 0.0423,\n    \"lastNameGivenCasteProb\": 0.2000,\n    \"socialCategoryProb\": 0,\n    \"educationProb\": 0.2189,\n    \"occupationProb\": 0.1800,\n    \"jointProbability\": 2.76e-05\n  },\n  \"generatedAt\": \"2026-07-12T21:56:35.146855\",\n  \"seed\": 7\n}\nnpm install @abhay557/indian-fakedata\n```\n\n*Requires **Node.js >= 18**.*\n\n```\npip install indian-fakedata\n```\n\n*Requires **Python 3.8+**.*\n\nBoth packages ship with the `indian-fakedata`\n\nCLI binary. The arguments are identical across both versions!\n\n```\n# Node.js\nnpx @abhay557/indian-fakedata [options]\n\n# Python (or globally installed Node package)\nindian-fakedata [options]\n```\n\nRun with no arguments to display the full help menu.\n\n| Flag | Alias | Description | Default |\n|---|---|---|---|\n`--count <n>` |\n`-c` |\nNumber of profiles to generate | `100` |\n`--output <path>` |\n`-o` |\nFile path to save output | stdout |\n`--format <fmt>` |\n`-f` |\nOutput format: `json` , `jsonl` , `csv`\n|\n`json` |\n`--seed <number>` |\n`-s` |\nReproducibility seed for RNG | random |\n`--no-metrics` |\nExclude probability metrics from output | included | |\n`--help` |\n`-h` |\nShow help screen |\n\nFilter generated profiles to specific demographic slices:\n\n| Flag | Values |\n|---|---|\n`--religion <string>` |\n`Hindu` , `Muslim` , `Christian` , `Sikh` , `Buddhist` , `Jain`\n|\n`--state <string>` |\ne.g. `Maharashtra` , `Tamil Nadu` , `Punjab`\n|\n`--gender <gender>` |\n`male` , `female` , `other`\n|\n`--caste <string>` |\ne.g. `Brahmin` , `Maratha` , `Jat`\n|\n`--socialCategory <cat>` |\n`SC` , `ST` , `OBC` , `General`\n|\n`--areaType <type>` |\n`urban` , `rural`\n|\n`--minAge <n>` |\nMinimum age (0–100) |\n`--maxAge <n>` |\nMaximum age (0–100) |\n`--education <level>` |\n`illiterate` , `primary` , `secondary` , `graduate` , etc. |\n`--occupation <sector>` |\n`cultivator` , `other_worker` , `non_worker` , etc. |\n`--maritalStatus <status>` |\n`never_married` , `married` , `widowed` , etc. |\n\n| Flag | Description |\n|---|---|\n`--enrich` |\nEnable ALL enrichment layers (outcomes + narrative:all + persona) |\n`--outcomes` |\n[Layer 2] Add credit score, health risk, employment outcome, education attainment |\n`--bias <0-1>` |\nBias dial for outcome simulation. `0.0` = pure meritocracy, `1.0` = max historical discrimination. Default: `0.3`\n|\n`--narrative <type>` |\n[Layer 3] Generate realistic Indian text documents. Repeat for multiple types: `loan_application` , `medical_consultation` , `school_enrollment` , `ration_card_application` , `hinglish_conversation` , `all`\n|\n`--persona` |\n[Layer 4] Generate LLM-ready agent persona (system prompt, beliefs, memory seeds) |\n\n```\n# 1000 profiles as CSV\nindian-fakedata -c 1000 -f csv -o profiles.csv\n\n# 50K Tamil Nadu Hindus as JSONL\nindian-fakedata -c 50000 -f jsonl -o tn_data.jsonl --state \"Tamil Nadu\" --religion Hindu\n\n# All enrichment layers with moderate bias\nindian-fakedata -c 100 --enrich --bias 0.3 -f jsonl -o enriched.jsonl\n\n# SC community fairness audit\nindian-fakedata -c 5000 --outcomes --bias 0.5 --socialCategory SC -f jsonl -o sc_bias.jsonl\njs\nimport { generate, generateEnriched } from '@abhay557/indian-fakedata';\n\nconst profiles = generate({ count: 10 });\nconst enriched = generateEnriched({ count: 5, includeOutcomes: true });\npython\nfrom indian_fakedata import generate, generate_enriched\n\nprofiles = generate(count=10)\nenriched = generate_enriched(count=5, include_outcomes=True)\n```\n\nEvery demographic profile, name distribution, and asset weighting is calibrated against public survey data:", "url": "https://wpnews.pro/news/stop-generating-nonsense-indian-mock-data-i-built-a-better-way", "canonical_source": "https://dev.to/abhay557/stop-generating-nonsense-indian-mock-data-i-built-a-better-way-3fnn", "published_at": "2026-07-14 07:13:25+00:00", "updated_at": "2026-07-14 07:31:19.041305+00:00", "lang": "en", "topics": ["developer-tools", "artificial-intelligence", "machine-learning"], "entities": ["indian-fakedata"], "alternates": {"html": "https://wpnews.pro/news/stop-generating-nonsense-indian-mock-data-i-built-a-better-way", "markdown": "https://wpnews.pro/news/stop-generating-nonsense-indian-mock-data-i-built-a-better-way.md", "text": "https://wpnews.pro/news/stop-generating-nonsense-indian-mock-data-i-built-a-better-way.txt", "jsonld": "https://wpnews.pro/news/stop-generating-nonsense-indian-mock-data-i-built-a-better-way.jsonld"}}