--- id: runstats version: "2.0.0" license: Apache 2.0 license_treatment: permissive maintenance: abandoned --- # runstats — Compute statistics and regression in one pass License: permissive · Maintenance: abandoned · Downloads: 146.1K/mo ## What it is and what it does RunStats is a Python module for computing statistics and regression summaries in a single pass over data, designed for scenarios where storing all values in memory is infeasible or where data arrives as a stream (e.g., from generators). It provides three main classes: Statistics for computing mean, variance, standard deviation, skewness, kurtosis, and min/max; Regression for computing slope, intercept, and correlation; and ExponentialStatistics for weighted statistics that emphasize recent values over older ones using a configurable decay rate. The module is pure Python with an optional Cython-optimized extension for performance. It handles sequences larger than available memory, supports combining multiple summary objects into aggregate summaries, and works with any iterable including generators. All calculations use Python's float type and are numerically stable. Use it for: - Monitor long-running system performance by computing latency or request-interval statistics from a continuous stream of measurements. - Analyze data from generators or large files where loading all values into memory is impractical. - Track exponential-weighted statistics to observe recent system behavior while gradually discounting historical data. - Combine statistics from multiple independent data streams into a single aggregate summary. - Compute linear regression on paired observations without storing all points, useful for trend analysis in time-series data. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Computes summary statistics (mean, variance, standard deviation, skewness, kurtosis, min, max) and linear regression (slope, intercept, correlation) in a single pass over data, without storing all values in memory. Yes, if you need single-pass statistics on streaming or memory-constrained data and can accept an abandoned package. The code is stable (Production/Stable status, no known vulnerabilities), well-tested, and pure Python, but no maintenance since 2021 means no fixes for future Python incompatibilities. Suitable for established systems where you control the Python version; avoid if you need active support or compatibility with Python 3.10+. ## Install pip install runstats uv add runstats poetry add runstats ## Installing runstats Before you install: Medium install friction due to optional Cython extension wheels built for specific Python versions (3.6–3.8 on multiple platforms), though pure-Python fallback is available. Package is abandoned as of 2021 with no recent maintenance. License in practice: Apache 2.0 permissive license allows commercial and private use with minimal restrictions; suitable for most projects. Quickstart: pip install runstats from runstats import Statistics, Regression stats = Statistics() for value in data: stats.push(value) print(stats.mean(), stats.variance()) regr = Regression() for x, y in pairs: regr.push(x, y) print(regr.slope(), regr.correlation()) Requires Python 3.6 or later; optional Cython extension requires a C compiler but pure-Python version works without it. Verify before relying: - Whether the optional Cython extension is automatically built and used, or requires manual compilation. - Current compatibility with Python versions beyond 3.9 (package tested only through 3.9). - Whether the abandoned status affects stability or introduces compatibility issues in modern environments. ## Package facts - License: Apache 2.0 (permissive) - Python support: supports_current - Install friction: medium - Maintenance: abandoned - Downloads: 146.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags online statistics single pass, streaming statistics computation, running mean variance calculation, one-pass regression analysis, memory-efficient statistics, exponential decay statistics, incremental statistics aggregation, streaming-data, numerics, abandoned [View on SkillFed](https://skillfed.io/packages/runstats) · [View on PyPI](https://pypi.org/project/runstats/)