Skip to main content

Light implementations for using moving averages in real time.

Project description

maverage - Moving Average

About maverage

maverage provides a Simple Moving Average implementation that delays the average calculation until requested - useful for programs that collect data in real-time and delay processing until later.

Basic Usage - Simple

>>> s = Simple(5)  # Simple object with internal buffer of size 5.
>>> s.input(4)
>>> s.input(2)
>>> s.average
3.0
>>>s.input(6).average
4.0

Testing

maverage tests are written using pytest. The dev Hatch environment includes pytest (refer to the Building section for details on how to set it up). Once inside the dev environment, run the tests by simply running pytest.

Building

maverage is set up to use Hatch for building.

Create a development environment using: hatch env create dev. Alternatively, use hatch shell -e dev to (1) created it if it doesn't exist and (2) open it in a shell session.

Note: To use the environment within VS Code, use the directory pointed to by the hatch find env dev command.

The project can be built, reversioned, and published with hatch's build, version, and publish commands, respectively.

License

This project uses the MIT License. Refer to LICENSE.txt for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

maverage-0.0.1.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

maverage-0.0.1-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file maverage-0.0.1.tar.gz.

File metadata

  • Download URL: maverage-0.0.1.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.24.0

File hashes

Hashes for maverage-0.0.1.tar.gz
Algorithm Hash digest
SHA256 3fa93f140da6763d9362ce2665c4b6893d0d321536bf7cd4680335a18589f8dd
MD5 3360bad846d2bc8a4f2bb699d60e5fd1
BLAKE2b-256 62d48b493b9c53886560053a1ca49e3533da61ac569872080236134b96cf46ec

See more details on using hashes here.

File details

Details for the file maverage-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: maverage-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.24.0

File hashes

Hashes for maverage-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0ae635c982a6ada84eaff3551ee3df400b3751a0d17d5001ca7437864d97427f
MD5 be153c1d75337b862fe52ca93ab89e97
BLAKE2b-256 7021b7e3c3a7bcc65935e170edd5682e63c169fcfd4f944f92602c872bb617b4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page