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.6.2(Alpha) — release-ready;0.6.1is the latest on PyPI (milestones M1–M11 shipped — M11 addedabk 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 realabksubprocesses (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. The0.6.xinterstitial then closed bothabk plansizing 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 ofSKIPPED: no baseline(0.6.2)). 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.6.1 — abk dashboard and CUPED-aware
abk plan sizing included. 0.6.2's abk plan --from-history lands with its tag;
until then install from source for it: pip install -e ".[dev]".)
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 reusablemetrics/*.ymllibrary (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 realabksubprocesses 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-claudesets 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
- Docs site: abkit.pipelab.dev — getting started, guides, reference
- Roadmap: ROADMAP.md · Principles: PRINCIPLES.md
- Contributor guide: CLAUDE.md · design contracts in docs/specs/
- Master plan (RU): docs/ru/project-initiation-spec.md
License
MIT.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ab_analysis_kit-0.6.2.tar.gz.
File metadata
- Download URL: ab_analysis_kit-0.6.2.tar.gz
- Upload date:
- Size: 555.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5168e1f7437144437963e1f6501bda9066a88e24cff2995bc066e6795aa2ed91
|
|
| MD5 |
1592e7fec5ad4812810cabf173743977
|
|
| BLAKE2b-256 |
780704c054764cd5016d6dd4c45c31ae505a0afd328f2a77b26cf1fa75b0e6e8
|
Provenance
The following attestation bundles were made for ab_analysis_kit-0.6.2.tar.gz:
Publisher:
publish.yml on alexeiveselov92/ab-analysis-kit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ab_analysis_kit-0.6.2.tar.gz -
Subject digest:
5168e1f7437144437963e1f6501bda9066a88e24cff2995bc066e6795aa2ed91 - Sigstore transparency entry: 2313374713
- Sigstore integration time:
-
Permalink:
alexeiveselov92/ab-analysis-kit@c77505bd64f6be3b830d395710aa120397247887 -
Branch / Tag:
refs/tags/v0.6.2 - Owner: https://github.com/alexeiveselov92
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c77505bd64f6be3b830d395710aa120397247887 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ab_analysis_kit-0.6.2-py3-none-any.whl.
File metadata
- Download URL: ab_analysis_kit-0.6.2-py3-none-any.whl
- Upload date:
- Size: 655.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cff2abec82cda3af81a4a1b56dafd5fc8301fb8f3c522b4e6b665afaff2d96d8
|
|
| MD5 |
bb7a4113312869e41d5290eca1ea584c
|
|
| BLAKE2b-256 |
73652254bbeb8fe00e6bb148cad5fe54adaf3c32b69597995eac48180876c077
|
Provenance
The following attestation bundles were made for ab_analysis_kit-0.6.2-py3-none-any.whl:
Publisher:
publish.yml on alexeiveselov92/ab-analysis-kit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ab_analysis_kit-0.6.2-py3-none-any.whl -
Subject digest:
cff2abec82cda3af81a4a1b56dafd5fc8301fb8f3c522b4e6b665afaff2d96d8 - Sigstore transparency entry: 2313374905
- Sigstore integration time:
-
Permalink:
alexeiveselov92/ab-analysis-kit@c77505bd64f6be3b830d395710aa120397247887 -
Branch / Tag:
refs/tags/v0.6.2 - Owner: https://github.com/alexeiveselov92
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c77505bd64f6be3b830d395710aa120397247887 -
Trigger Event:
push
-
Statement type: