Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

ablift logo

ablift

PyPI CI Python License: MIT Ruff uv

Statistical analysis and planning for A/B/n experiments from the command line, with structured JSON output for agents and pipelines.

ablift running a sequential analysis on a three-variant checkout test

Alpha. The statistics are tested against reference implementations, but the CLI and output format may still change before 1.0.

Why ablift

  • Rigorous estimates, not a black box. Computes lifts, intervals, Bayesian posteriors (probability to beat control, expected loss, probability_best), always-valid sequential e-values (mSPRT), and fixed-horizon p-values. Pass --recommend when you also want an opt-in rule-based recommendation.
  • Look at results as often as you like. Sequential mode uses mSPRT with always-valid confidence intervals, so checking daily does not inflate false positives.
  • Catches bad data automatically. Sample ratio mismatch, sparse conversion counts, whale-dominated revenue, and pre-experiment covariate imbalance are always checked and reported in top-level risk_flags.
  • Built for agents and pipelines. JSON in, JSON out, published JSON Schemas, stdin support, clean errors, and stable exit codes.

Install

ablift is currently published as a pre-release, so allow pre-releases when installing:

uv tool install --prerelease=allow ablift   # or: pip install --pre ablift

Quickstart

# Analyze a starter JSON experiment (Bayesian by default)
ablift example-input | ablift analyze --input -

# Pipe in a CSV and run a sequential test you can re-check every day
printf 'variant,visitors,conversions\ncontrol,30000,1200\nnew_checkout,30000,1410\n' \
  | ablift analyze --input - --input-format csv --method sequential

# Plan how long a sequential test needs to run (duration and power need --method)
ablift duration --method sequential --baseline-rate 0.04 --relative-mde 0.05 --daily-traffic 50000

# Power analysis: what lift can 10,000 users per variant detect in a single-look test?
ablift power --method fixed --baseline-rate 0.08 --n-per-variant 10000

Add --report report.md to any analyze run for a human-readable Markdown summary.

What it supports

Method (--method) Conversion rate ARPU (revenue per visitor) Ratio (e.g. CTR, AOV)
bayesian: probability to beat control, expected loss ✅ ✅ ✅
sequential: mSPRT, always-valid, safe to peek ✅ ✅ ✅
fixed: z / Welch t / Fisher exact, one planned look ✅ ✅ ✅

Also included:

  • A/B/n tests with Bonferroni correction, or joint probability_best in Bayesian mode
  • CUPED variance reduction using a pre-experiment covariate, often cutting required traffic substantially
  • Guardrail and secondary metrics evaluated per variant
  • SRM checks with custom traffic splits (--expected-split 90,10)
  • Heavy-tailed revenue handling with pooled winsorization and bootstrap intervals
  • Duration planning and power analysis for conversion rate and ARPU: sample size and days (duration), or power and minimum detectable effect for a given sample size (power)
  • Input from JSON, CSV, XLSX or stdin, with output as JSON and an optional Markdown report

Commands

Command What it does
ablift analyze Analyze an experiment from JSON, CSV, XLSX or stdin
ablift duration Estimate the sample size and days a test needs
ablift power Power for a given sample size, or the smallest lift it can detect
ablift schema Print the JSON Schema for inputs and outputs
ablift example-input Print a starter JSON input
ablift doctor Check the environment (--strict fails CI on problems, --json-output for agents)

Run ablift <command> --help for every option.

Documentation

  • Inputs: choosing a metric, the JSON contract, CSV/XLSX layouts, stdin and pyproject.toml defaults
  • Reference SQL: ANSI SQL query for turning raw exposure and event tables into aggregated CSV or CUPED JSON input
  • Statistical methods: what each method computes and how multiple variants are handled
  • Duration and power: sample size, runtime, power and minimum detectable effect
  • Agents and automation: schemas, a step-by-step playbook, exit codes and every output field
  • Changelog

Limitations

  • Aggregated ARPU inputs cannot be winsorized after aggregation (only a CV-based heavy_tailed_revenue warning is emitted); pass row-level revenue with --winsorize Q (and optionally --bootstrap-samples N) when whale outliers are present.
  • mSPRT guarantees assume you re-run the analysis on cumulative data as it arrives. The tool keeps no state between looks.
  • CUPED variance reduction currently supports conversion_rate and arpu primary metrics (not ratio).

Development

uv sync                  # installs the test and lint groups
uv run pytest            # test suite, including the docs checks
make lint                # ruff and ty
make demo                # run every bundled example into examples/out/
make docs                # re-render docs/demo.svg after changing CLI output

See CONTRIBUTING.md for how changes are checked and released.

License

MIT. See LICENSE.

Metadata

Release files for ablift 0.5.0a3

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

Source distribution (sdist)

Source distribution for ablift 0.5.0a3
File Size Uploaded Provenance Actions
ablift-0.5.0a3.tar.gz 148.5 kB With provenance Details for ablift-0.5.0a3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ablift 0.5.0a3
File Interpreter ABI Platform Actions
ablift-0.5.0a3-py3-none-any.whl Python 3 none any Details for ablift-0.5.0a3-py3-none-any.whl

Total release size: 216.2 kB

Release files / ablift-0.5.0a3.tar.gz

Download URL ablift-0.5.0a3.tar.gz
Size 148.5 kB
Tags Source
SHA-256 checksum
How to use checksums
3b90ddad9e61212018b02a0f18af34473d376e6411958dcaaaea98c70279a126
BLAKE2b-256 checksum
How to use checksums
607e4b113405823e93005140e9f790622362e6b043feb39557bf4629f8641918
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 27, 2026.

Transparency log

Release files / ablift-0.5.0a3-py3-none-any.whl

Download URL ablift-0.5.0a3-py3-none-any.whl
Size 67.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9bba39feefa83038e5a4c73f9804d1330eb09566ad22f5b54b3a31264db6ad30
BLAKE2b-256 checksum
How to use checksums
1a951c95b37ad54c8bf4f3c2081c7006470c22578802923eca7db0802e7f994c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 27, 2026.

Transparency log

Security for ablift 0.5.0a3

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ablift-0.5.0a3.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 Nov 27, 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