Registry / data / quantile-python

quantile-python

JSON →
library1.1pypypi✓ verified 82d ago

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.

pip install quantile-python
INSTALL
IMPORT
SIG · QUANTILE-PYTHON
Q
quantile-python
datapythonv1.1
Install
2.5s avg
Import
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
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
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 19.2MB
glibc
py 3.103.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.

Estimator
from quantile import Estimator
from quantile_python import QuantileEstimator

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))
Debug
Known issues
gotchaThe import path uses underscores (quantile_python), not hyphens. Importing with hyphens (quantile-python) will raise ModuleNotFoundError.
fix
Use 'from quantile_python import QuantileEstimator'.
affects: all
gotchaThe epsilon parameter controls the memory-accuracy tradeoff; very small epsilon (e.g., 0.0001) may cause excessive memory usage or slow insertions.
fix
Start with epsilon=0.01 or higher for large streams.
affects: all
deprecatedThe library has not been updated since 1.1 (released ~2022). It depends on Python standard libraries only but may not support newer Python versions if breaking changes occur.
fix
Test with your Python version; consider switching to alternative libraries like tdigest if compatibility issues arise.
affects: >=1.1
Upgrade
Version history
1.1latest on PyPI · released Feb 11, 2015
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
quantile-python — pip install quantile-python · libregistry