skillfed

runstats

Compute statistics and regression in one pass

runstats v2.0.0 146.1K downloads/30d#11,109 on PyPI101
Permissive license Apache 2.0 Abandoned released

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 on this page — 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

runstats on PyPI

pip

pip install runstats

uv

uv add runstats

poetry

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 the current Python release (>=3.6)
Install friction medium — platform-specific wheel
Runtime dependencies none
Maintenance abandoned — 1,890 days since the last release
Last repo commit
First released
Downloads 146,069/month — #11,109 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: runstats-2.0.0-cp36-cp36m-macosx_10_9_x86_64.whl; runstats-2.0.0-cp36-cp36m-manylinux1_i686.whl; runstats-2.0.0-cp36-cp36m-manylinux1_x86_64.whl; runstats-2.0.0-cp36-cp36m-manylinux2010_i686.whl; runstats-2.0.0-cp36-cp36m-manylinux2010_x86_64.whl; runstats-2.0.0-cp36-cp36m-win32.whl; runstats-2.0.0-cp36-cp36m-win_amd64.whl; runstats-2.0.0-cp37-cp37m-macosx_10_9_x86_64.whl; runstats-2.0.0-cp37-cp37m-manylinux1_i686.whl; runstats-2.0.0-cp37-cp37m-manylinux1_x86_64.whl; runstats-2.0.0-cp37-cp37m-manylinux2010_i686.whl; runstats-2.0.0-cp37-cp37m-manylinux2010_x86_64.whl; runstats-2.0.0-cp37-cp37m-win32.whl; runstats-2.0.0-cp37-cp37m-win_amd64.whl; runstats-2.0.0-cp38-cp38-macosx_10_9_x86_64.whl; runstats-2.0.0-cp38-cp38-manylinux1_i686.whl; runstats-2.0.0-cp38-cp38-manylinux1_x86_64.whl; runstats-2.0.0-cp38-cp38-manylinux2010_i686.whl; runstats-2.0.0-cp38-cp38-manylinux2010_x86_64.whl; runstats-2.0.0-cp38-cp38-win32.whl

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseNatural Language :: EnglishProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPython

Tags

online statistics single passstreaming statistics computationrunning mean variance calculationone-pass regression analysismemory-efficient statisticsexponential decay statisticsincremental statistics aggregation
streaming-datanumericsabandoned

More Mathematics packages