skillfed

fastdigest

A fast t-digest library for Python built on Rust.

fastdigest v0.12.0 152.6K downloads/30d#10,897 on PyPI20
Permissive license Active released

What it is and what it does

fastdigest is a Python wrapper around a Rust implementation of the t-digest data structure, designed for computing approximate quantiles and other online statistics on streaming or distributed data. It trades exact computation for speed and memory efficiency, making it suitable for scenarios where you need to estimate percentiles, medians, or trimmed means from large datasets without storing all values in memory.

The package provides methods to initialize a digest from values, incrementally update it with new data (with optional weighting), merge multiple digests together, and query statistics like quantiles, cumulative distribution function values, means, and median absolute deviation. It supports serialization to/from dictionaries and pickle format, and aims for API compatibility with the tdigest library to ease migration.

Use it for:

  • Estimate percentiles from streaming sensor or log data without storing all raw values
  • Aggregate quantile statistics across distributed compute jobs via digest merging
  • Detect anomalies by tracking CDF shifts or trimmed means over time
  • Compute real-time analytics dashboards that need fast quantile updates on large datasets
  • Replace slower pure-Python t-digest implementations in existing codebases

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

fastdigest provides a Rust-backed t-digest implementation for computing streaming quantiles, percentiles, and online statistics on large or distributed datasets with minimal memory overhead.

Yes. fastdigest is actively maintained, has no security vulnerabilities, carries a permissive MIT license, and offers substantial speed gains (480x faster than tdigest in the documented benchmark) with a straightforward API. Install it if you need streaming quantile estimation or online statistics on large datasets and want a fast, dependency-free solution.

Install

fastdigest on PyPI

pip

pip install fastdigest

uv

uv add fastdigest

poetry

poetry add fastdigest

Installing fastdigest

Before you install

Medium install friction due to compiled wheels; prebuilt binaries are available for Python 3.7–3.14 across macOS, Linux (including musl), and Windows architectures. Active maintenance with recent commits; no runtime dependencies.

License in practice

MIT license (permissive); you may use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.

Quickstart

pip install fastdigest

from fastdigest import TDigest

digest = TDigest.from_values(range(1001))
print(digest.quantile(0.99))  # 99th percentile
print(digest.cdf(990))        # rank of value 990

Verify before relying

  • Accuracy bounds or error guarantees for quantile estimates compared to exact computation
  • Memory consumption scaling with digest size or data distribution
  • Whether the package supports Python 3.14 and 3.13 in practice or only declares support

Package facts

License not declared (permissive)
Python support supports the current Python release (>=3.7)
Install friction medium — platform-specific wheel
Runtime dependencies none
Maintenance actively maintained — 152 days since the last release
Last repo commit
First released
Downloads 152,643/month — #10,897 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: fastdigest-0.12.0-cp310-cp310-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl; fastdigest-0.12.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; fastdigest-0.12.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl; fastdigest-0.12.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl; fastdigest-0.12.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl; fastdigest-0.12.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; fastdigest-0.12.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl; fastdigest-0.12.0-cp310-cp310-musllinux_1_2_aarch64.whl; fastdigest-0.12.0-cp310-cp310-musllinux_1_2_armv7l.whl; fastdigest-0.12.0-cp310-cp310-musllinux_1_2_i686.whl; fastdigest-0.12.0-cp310-cp310-musllinux_1_2_x86_64.whl; fastdigest-0.12.0-cp310-cp310-win32.whl; fastdigest-0.12.0-cp310-cp310-win_amd64.whl; fastdigest-0.12.0-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl; fastdigest-0.12.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; fastdigest-0.12.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl; fastdigest-0.12.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl; fastdigest-0.12.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl; fastdigest-0.12.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; fastdigest-0.12.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl

Keywords: t-digest, tdigest, statistics, quantile, percentile, online learning, streaming, big data, aggregation, real-time analytics, anomaly detection, rust, pyo3

Development Status :: 4 - BetaIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Free ThreadingProgramming Language :: Python :: Implementation :: CPythonProgramming Language :: RustTopic :: Scientific/EngineeringTopic :: Scientific/Engineering :: Information AnalysisTopic :: Scientific/Engineering :: MathematicsTopic :: Software Development :: Libraries :: Python Modules

Tags

t-digest quantile estimationstreaming statistics pythonpercentile calculation onlinedistributed data aggregationmemory-efficient quantilesreal-time analytics digestrust-powered statistics
streaming-analyticsquantile-estimationrust-extension

More Scientific/Engineering packages