Skip to main content

Utility to count events and merge event counts from other EventCounters

Project description

EventCounter

EventCounter is a Python module to count events and print event statistics.

Install

pip install eventcounter

Usage

Count events with log() and print() counted events.

from eventcounter import EventCounter
from random import randint

counter: EventCounter = EventCounter("Numbers")

for _ in range(100):
    if randint(1, 10) % 2 == 0:
        counter.log("even number")
    else:
        counter.log("odd number")

counter.print()

Output

even number   : 53
odd number    : 47

Example

Full runnable example below. It can be found in demos/ folder.


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

eventcounter-0.4.2.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

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

eventcounter-0.4.2-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file eventcounter-0.4.2.tar.gz.

File metadata

  • Download URL: eventcounter-0.4.2.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for eventcounter-0.4.2.tar.gz
Algorithm Hash digest
SHA256 cfe94dfc46d4edf8e5ca6e067dfe192a826b4027b033ca08ce0f2d8c23306d9b
MD5 992e23fdff7191ba2cb623de839190d6
BLAKE2b-256 1bcdadd1310b98e00d53e3912a905250dcd18d4e89ebb35fc0cdfaeb63521162

See more details on using hashes here.

Provenance

The following attestation bundles were made for eventcounter-0.4.2.tar.gz:

Publisher: python-publish.yml on Jylpah/eventcounter

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eventcounter-0.4.2-py3-none-any.whl.

File metadata

  • Download URL: eventcounter-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for eventcounter-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 53bfdd5130fae941480d5aaad26de0a0e3218072d57442bb3981b799f0b19431
MD5 83fa1570e5a2f136eb6401dbe6e8ddd8
BLAKE2b-256 f3c34abf3fcbf34cd846eec319e29adb71d9e12c30f9d45999d4fa4b34a579eb

See more details on using hashes here.

Provenance

The following attestation bundles were made for eventcounter-0.4.2-py3-none-any.whl:

Publisher: python-publish.yml on Jylpah/eventcounter

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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