The 7 generator types
Everything Phony produces comes from a generator. There are seven kinds. Pick by the nature of the data you need.
| Need | Type | Example |
|---|---|---|
| Computed from an algorithm | Logic | UUID, random int, date, sequence |
| One of a fixed valid set | List | country, HTTP status, currency |
| Realistic for a locale | Model | person names, company names |
| Composed from other values | Template | email, full address, SKU |
| Matching a distribution | Statistical | ages ~ Normal(35, 12) |
| Coherent across columns | Linked | city + country + postal |
| Chronological dates | Event Sequence | created → paid → shipped |
Logic — pure algorithm
No data, no locale, fastest. uuid_v4/uuid_v7/ulid/nanoid, int_between, float_between, boolean, datetime_between/date_between/timestamp, sequence, gaussian, exponential.
"age": { "type": "logic", "algorithm": "int_between", "params": { "min": 18, "max": 85 } }List — a finite valid set
When the value must be correct (a real currency, a valid status). Inline or from a locale asset; optionally weighted.
"status": { "type": "list", "values": [
{ "value": "active", "weight": 70 }, { "value": "churned", "weight": 30 } ] }Model — realistic, locale-flavoured (N-gram)
Trained on real samples, it generates new values that follow the same patterns — Turkish names that sound Turkish, without copying the training set. Modes: word, sentence, text, paragraph, poem, acrostic, real_word.
"first_name": { "type": "model", "source": "person.first_names",
"generation": { "mode": "word" } }Template — composition
Combines other generators and literals via the expression language: a pattern, weighted variants, and a post-processing operations pipeline.
"email": { "type": "template",
"pattern": "{{lowercase(first_name)}}@{{pick(['gmail.com','yahoo.com'])}}" }Statistical — distributions
Match real-world shape, not just randomness: categorical (frequencies) or continuous (normal, lognormal, exponential, uniform, poisson, beta, gamma), with optional differential privacy.
"customer_age": { "type": "statistical", "mode": "continuous", "distribution": "normal",
"params": { "mean": 35, "stddev": 12 }, "constraints": { "min": 18, "max": 85 } }Linked — coherent multi-column
When columns must agree, one record drives them all — so you never get "Ankara, Japan". A source record, or rules that compute related columns.
"location": { "type": "linked", "source": "geo.locations",
"columns": ["city","country","postal_code"] }Fields reference its columns: location.city, location.country.
Event Sequence — chronological dates
A base event plus probabilistic, delayed follow-ups that respect order.
"timeline": { "type": "event_sequence", "events": [
{ "name": "created_at", "base": true, "range": { "start": "-1year", "end": "now" } },
{ "name": "paid_at", "after": "created_at", "delay": { "min": "0h", "max": "24h" }, "probability": 0.95 } ] }For exact parameters and edge cases, see the Generator Types spec and the Generator × Asset matrix.