--- id: ddsketch version: "3.0.1" license: unclear license_treatment: permissive maintenance: active --- # ddsketch — Distributed quantile sketches License: permissive · Maintenance: active · Downloads: 5.8M/mo ## What it is and what it does DDSketch is a Python implementation of a distributed quantile sketch algorithm that estimates any quantile of a dataset while guaranteeing a bounded relative error. The default relative error is set to 0.01, meaning if the true quantile is x, the sketch returns a value y such that the relative difference stays within that bound. Instead of storing all data points, it maintains a compact sketch that grows predictably even for large datasets with sub-exponential tails. The package is designed for distributed systems: you can create sketches on different nodes, add data to each independently, and then merge them into a central sketch to compute accurate quantiles across the combined dataset. It provides a standard DDSketch implementation plus variants (LogCollapsingLowestDenseDDSketch and LogCollapsingHighestDenseDDSketch) that trade accuracy guarantees for different quantile ranges, with configurable bin counts (default m = 2048) to tune memory versus precision. Use it for: - Computing percentiles of request latencies across distributed services without storing all raw measurements. - Estimating quantiles of financial data or sensor readings where you need bounded error but cannot afford to keep every data point. - Merging quantile summaries from multiple data sources or time windows to compute aggregate statistics. - Monitoring systems where you need to track tail latencies with minimal memory overhead. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. DDSketch computes quantiles (percentiles) of streaming or batch data with guaranteed relative error bounds, and supports merging sketches from distributed systems into a single combined sketch. Yes. DDSketch is actively maintained, has no known vulnerabilities, installs with minimal friction, and solves a specific problem (distributed quantile estimation with error guarantees) that is difficult to implement correctly from scratch. Use it if you need accurate percentile estimates from streaming or distributed data without storing raw values. ## Install pip install ddsketch uv add ddsketch poetry add ddsketch ## Installing ddsketch Before you install: Low friction: pure Python wheel with a single lightweight runtime dependency (six). Actively maintained with recent commits and no known vulnerabilities. License in practice: Permissive license allows commercial and private use with minimal restrictions. Quickstart: pip install ddsketch from ddsketch import DDSketch sketch = DDSketch() for value in [1.0, 2.5, 3.7, 5.2]: sketch.add(value) median = sketch.get_quantile_value(0.5) Requires Python 3.7 or later. Verify before relying: - Whether numpy is a runtime dependency or only a development/optional dependency (description mentions it but fact sheet lists only six). - Performance characteristics for very large datasets or high-frequency streaming scenarios. - Real-world use cases for tail latency monitoring and typical quantile queries in production systems. ## Package facts - License: not declared (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 5.8M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags quantile estimation streaming, distributed sketch algorithm, percentile calculation, mergeable quantile sketch, relative error quantiles, streaming statistics, streaming-statistics, distributed-computing, quantile-sketch [View on SkillFed](https://skillfed.io/packages/ddsketch) · [View on PyPI](https://pypi.org/project/ddsketch/)