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.2.0(Alpha) — release-ready (milestones M1–M7;0.1.2is the latest published on PyPI, thev0.2.0tag/publish is the maintainer's pending step). The statistical core, the declarative config / DB / pipeline layer, the explore cockpit + self-contained reports,abk validate(now 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]
(For 0.2.0 before its tag lands, install from source — 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 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.2.0.tar.gz.
File metadata
- Download URL: ab_analysis_kit-0.2.0.tar.gz
- Upload date:
- Size: 398.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d795be6654c39517ea8dce8090db648481661ee2241546c749a321ccbb6e245
|
|
| MD5 |
6d3fc26118202a24b07892b72d222144
|
|
| BLAKE2b-256 |
2c5f22152a3fc1f93be6628387e2d214027d805ca0d690f834d5f0e03501a79e
|
Provenance
The following attestation bundles were made for ab_analysis_kit-0.2.0.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.2.0.tar.gz -
Subject digest:
8d795be6654c39517ea8dce8090db648481661ee2241546c749a321ccbb6e245 - Sigstore transparency entry: 2205365650
- Sigstore integration time:
-
Permalink:
alexeiveselov92/ab-analysis-kit@10ecb84c3a48dbde5a00a63cd721fc8744b89623 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/alexeiveselov92
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@10ecb84c3a48dbde5a00a63cd721fc8744b89623 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ab_analysis_kit-0.2.0-py3-none-any.whl.
File metadata
- Download URL: ab_analysis_kit-0.2.0-py3-none-any.whl
- Upload date:
- Size: 485.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f2e7c6e8ed673ef7f03a3766aa63f516d6b985f007b8a6ee9cb3140b42d26da
|
|
| MD5 |
e987c20942968f35baa9d3bae788e7f0
|
|
| BLAKE2b-256 |
57dee403700dc657a0be5546cdbd338c1da65ee5fdfc044b3b0d28fd37df1008
|
Provenance
The following attestation bundles were made for ab_analysis_kit-0.2.0-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.2.0-py3-none-any.whl -
Subject digest:
8f2e7c6e8ed673ef7f03a3766aa63f516d6b985f007b8a6ee9cb3140b42d26da - Sigstore transparency entry: 2205365685
- Sigstore integration time:
-
Permalink:
alexeiveselov92/ab-analysis-kit@10ecb84c3a48dbde5a00a63cd721fc8744b89623 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/alexeiveselov92
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@10ecb84c3a48dbde5a00a63cd721fc8744b89623 -
Trigger Event:
push
-
Statement type: