Relational Data (Families)

Generate an entire household from a single seed.

# CLI
indian-fakedata --family --seed 011 -f jsonl

# Python
from indian_fakedata import generate_family
family = generate_family(seed="011")

# TypeScript
import { generateFamily } from '@abhay557/indian-fakedata';
const family = generateFamily({ seed: '011' });

Output shape

{
  "head":     { "...profile..." },
  "spouse":   { "...profile..." },
  "parents":  { "father": { "...profile..." }, "mother": { "...profile..." } },
  "children": [ { "...profile..." } ],
  "siblings": [ { "...profile..." } ]
}

Consistency guarantees

Every member of the family is consistent with the head:

Options

OptionDescription
seedNumber or string seed; default random
constraintsSame as generate — inherited by the head, then propagated
includeProbabilityMetricsInclude per-profile probability chains

Seeds

Seeds can be numbers or strings. "011" is a string seed — supported by both runtimes. Same seed, same family, within a runtime.

Programmatic example

from indian_fakedata import generate_family

family = generate_family(seed="011", constraints={"state": "Punjab"})

head = family["head"]
print(head["firstName"], head["lastName"], "|", head["state"])

for child in family["children"]:
    assert child["lastName"] == head["lastName"]
    assert child["age"] < head["age"]

if family["spouse"]:
    assert family["spouse"]["gender"] != head["gender"]