Python Implementation of Graham Cormode and S. Muthukrishnan's Effective Computation of Biased Quantiles over Data Streams in ICDE'05. Version 1.1 is the latest stable release. The library has a low release cadence with no recent updates; it provides an efficient algorithm for computing biased quantiles over data streams.
Install & Compatibility
Where this runs
tested against v1.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 19.2MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 2.5s · import 0.000s · 20MB
17MB installed
● package 17MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
from quantile import Estimator
Demonstrates creating a QuantileEstimator, inserting values, and querying quantiles.
from quantile_python import QuantileEstimator
# Create an estimator with a desired error epsilon (epsilon = 0.001 means about 0.1% error)
estimator = QuantileEstimator(epsilon=0.001)
for value in range(1000):
estimator.insert(value)
# Get quantiles: 0.5 (median), 0.9, 0.99
print("Median:", estimator.query(0.5))
print("90th percentile:", estimator.query(0.9))
print("99th percentile:", estimator.query(0.99))
Upgrade
Version history
Breaking-change detection hasn't run for this library yet.
Audit
Security & dependencies
CVE tracking and dependency tree are planned for a later release.