Skip to main content

ab-analysis-kit

A/B experiment analysis as declarative YAML + SQL — with a chart-first cockpit.

ab-analysis-kit (CLI abk) is an open-source, declarative (dbt / detectkit-style), database-agnostic, numpy-first Python library for analyzing A/B experiments. You define an experiment and its metrics in YAML + SQL; abkit computes per-method effect + confidence interval + p-value + MDE/power cumulatively over the experiment's lifetime (the stabilization chart), writes them to a clean warehouse table any BI can read, and gives you a local cockpit to tune the analysis and a harness to prove your method is actually calibrated.

Status: 0.8.0 (Alpha) — the latest on PyPI (milestones M1–M13 shipped — M13 is the versioned statistics milestone: five opt-in options that each buy power or fix an interval, with no default moved — a project that changes nothing reproduces 0.7.0 row for row. correction: holm is uniformly more powerful than one-step Bonferroni at the same family error rate; contrasts: vs_control declares the family you actually decide on, so the divisor is g−1 instead of C(g,2) (≈ +10 points of power at four arms) and the treatment-vs-treatment pairs stop being computed; guardrail_correction: none takes a guardrail out of the screening budget entirely; interval: score gives proportions an interval that is the inversion of the z-test printed beside it (no more "significant" next to a CI covering zero, and a real answer on empty cells); and interval: fieller does the same for the relative lift of the five mean-based methods — the delta interval it replaces has nominal two-sided coverage with lopsided tails (1.7% / 3.3% against 2.5% each), and every abkit verdict is a one-sided claim. abk validate gained the one column that can tell those two apart: the share of false positives falling below zero. M12 wired notifications: abk run --notify and abk validate --notify push what a run just decided to nine channel types (Slack, Telegram, email, webhook, Mattermost, Discord, Teams, Google Chat, ntfy), as six routable signals — the readout verdict, a verdict flip, a failed sample-ratio gate, a pipeline error, a slipped schedule, and an A/A cell that broke its false-positive budget. Nothing is recomputed for a message, so it cannot disagree with the report; a repeat run over unchanged data is silent; and no channel failure can change an exit code. M11 added abk dashboard, the project-level cockpit: one row per experiment with its headline verdict, effect + CI, p/α and a sparkline of the cumulative series, plus buttons that spawn real abk subprocesses (Run — for the whole experiment or one metric — Unlock, Clean, Explore, Open report) and stream their logs. It is a launcher: it computes no statistic and never takes the pipeline lock, so every verdict on the page is the readout's own. The 0.6.x interstitial then closed both abk plan sizing gaps: a CUPED comparison is sized on the covariate correlation its own results row already persists — required-N is (1 − ρ²)× the old raw-variance bound (0.6.1) — and --from-history <N d> gives an experiment that has never run a baseline from the days before its start, instead of SKIPPED: no baseline (0.6.2). A second 0.6.x interstitial then gave the dashboard CRUD YAML editing — edit, create, delete an experiment from the cockpit, validated at both levels and archived byte-verbatim before every write — added abk ui as its alias, and made M9's additive read path discoverable: abk run no longer stays quiet about an undecided compute.incremental_reads, --cost-report prints the counterfactual, and abk init scaffolds it on (0.6.4)). The statistical core, the declarative config / DB / pipeline layer, the explore cockpit + self-contained reports, abk validate (numpy-vectorized — minutes → sub-seconds), opt-in sequential analysis + abk plan, and the DX layer (abk init-claude, docs site, Prefect scaffolding) are all shipped. Docs: abkit.pipelab.dev.

Install

pip install ab-analysis-kit          # Python 3.10+; add a DB extra for real data:
pip install "ab-analysis-kit[clickhouse]"   # or [postgres] / [mysql] / [all-db]

(pip install ab-analysis-kit gets 0.8.0 — the opt-in M13 statistics (Holm, the declared contrast set, the score and Fieller intervals, the A/A sign column), opt-in notifications across nine channels, abk dashboard with its YAML editor, abk ui, CUPED-aware abk plan sizing, abk plan --from-history and the discoverable additive read path all included.)

abk --version and abk --help work with no database driver; you can even lint a config (abk run --steps validate) with no database at all. See the getting-started guide for the full first run.

What it does

  • Declarative experiments — experiments/*.yml (assignment + variants + comparisons) referencing a reusable metrics/*.yml library (YAML + SQL).
  • A rigorous statistical engine — t-test, two-proportion z-test, CUPED, ratio (delta-method), and a vectorised bootstrap family (plain/paired/Poisson/ post-normed), with relative & absolute effects, MDE/power, and multiple-testing correction. Ported from a battle-tested legacy engine and improved deliberately.
  • The cumulative stabilization chart — effect + CI per day from experiment start, so you see the estimate converge and call a winner only once it stabilizes.
  • abk dashboard — the project-level cockpit: every experiment as one row (verdict, effect + CI, p/α, sparkline), with Run / Unlock / Clean / Explore / Open-report buttons that spawn real abk subprocesses and stream their logs. It never computes a statistic itself, so what you read is the readout's own verdict.
  • abk explore — a local, chart-first cockpit to turn method knobs (CUPED, stratification, alpha…) and watch the result recompute live, with A/A calibration always in view. The priority interface.
  • abk validate — an A/A false-positive + power matrix that measures your method's real α (including the honest cumulative-peeking FPR), not the nominal.
  • BI-agnostic — results land in one clean table; connect Grafana, Lightdash, Metabase, or Superset. Orchestrate with Prefect.
  • AI-native — abk init-claude sets up assistant context + skills so an assistant can scaffold and tune experiments with (or for) you.

Design at a glance

experiment (YAML)  ──▶ load exposures ──▶ SRM gate ──▶ compute (t/z/CUPED/bootstrap) ──▶ readout
  └ references reusable metrics (YAML + SQL)                                          └ _ab_results → your BI

abkit is the sibling of detectkit: same DNA (CLI-first, db-agnostic, numpy-first, self-contained reports, a chart-first cockpit, init-claude), with the anomaly detect stage replaced by a statistical compute stage and the primary entity flipped from metric to experiment.

Documentation

License

MIT.

Metadata

Release files for ab-analysis-kit 0.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ab-analysis-kit 0.8.0
File Size Uploaded Provenance
ab_analysis_kit-0.8.0.tar.gz 647.9 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for ab-analysis-kit 0.8.0
File Interpreter ABI Platform
ab_analysis_kit-0.8.0-py3-none-any.whl Python 3 none any Details

Total release size: 1.4 MB

Release files / ab_analysis_kit-0.8.0.tar.gz

Download URL ab_analysis_kit-0.8.0.tar.gz
Size 647.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a9c7cf16babc5f71f9f6474d6c64356c59c834db4eec3644c36d7bbff97056e6
BLAKE2b-256 checksum
How to use checksums
c8a7f76799da08f2ba30b7a2d68d6ec6d11f62bc770cb7ec225b57a3312779d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 5, 2026.

Transparency log

Release files / ab_analysis_kit-0.8.0-py3-none-any.whl

Download URL ab_analysis_kit-0.8.0-py3-none-any.whl
Size 759.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8e266fd47e0fffb7fbc9b2d75577167e6eca88496bf48812eb9f4c8ddb130f8b
BLAKE2b-256 checksum
How to use checksums
672ee10a06ea9d658fc63d5e41435d6e70568ff54aebf99c39154ed66316d259
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 5, 2026.

Transparency log

Security for ab-analysis-kit 0.8.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ab_analysis_kit-0.8.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 5, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page