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.3.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.3-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: eventcounter-0.4.3.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.3.tar.gz
Algorithm Hash digest
SHA256 ca800c2472b8f83dda5657c7b231a3b28772bc30c5f482d136b98ba30f4ef398
MD5 fa8f70d0d876db461b8c1d6884bfaabd
BLAKE2b-256 86b77b0b3fdfe294e257b423f2e9db93807041f05458dcf451b5cfcd1f0aef61

See more details on using hashes here.

Provenance

The following attestation bundles were made for eventcounter-0.4.3.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.3-py3-none-any.whl.

File metadata

  • Download URL: eventcounter-0.4.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3d098399ed1079d695cb40d47e2c5d4d1daff8a677061db6c70d8b105256a07b
MD5 04442bdb00c3132804ab8c917395ea07
BLAKE2b-256 92676fe26f26e0e6e65be444df8e25fc2403a5809523ede049cfe94d6621769d

See more details on using hashes here.

Provenance

The following attestation bundles were made for eventcounter-0.4.3-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