havoc-monkey
Find the cracks in production before production does

Controlled destruction for data pipelines
Reproducible attacks on your terms

pip install havoc-monkey
pandas native · six reproducible attack vectors · zero config

Six attack vectors

Every attack is seeded, returns a copy of your DataFrame, never mutating the input, and reports exactly what changed and by how much.

null_flood

Injects nulls into any column. The most common real failure, and your pipeline probably won't raise an exception.

volume_shock

Empty batches, large overflows, or truncated partials. See if your pipeline handles what it wasn't given.

type_coerce

Flips int to float, str to bool, object to numeric. The kind of breakage that survives ingestion.

schema_drift

Drops, renames, adds, or reorders columns, the way an upstream team deploys without telling you.

outlier_inject

Pushes values N standard deviations beyond the distribution, the kind that wrecks an aggregation.

temporal

Out-of-order, late, future, missing windows, duplicate timestamps. Event-time logic is hard to get right.

Five lines to deliberate destruction

Seed it, attack it, pass a health check. That's the whole API surface.

from havoc_monkey import HavocMonkey

monkey = HavocMonkey(seed=42)

# single attack, returns df.copy(), never mutates
attacked = monkey.null_flood(df, cols=['amount'], pct=0.15)

# campaign with health check
def check(d):
    result = my_pipeline(d)
    assert result['amount'].notnull().all(), "nulls leaked"
    return True

report = monkey.campaign(
    df,
    attacks=['null_flood', 'schema_drift', 'temporal'],
    health_check=check,
)
print(report)
Each result is classified as: PASSED FAILED ERROR UNKNOWN