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()

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.1.tar.gz (7.2 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.1-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: eventcounter-0.4.1.tar.gz
  • Upload date:
  • Size: 7.2 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.1.tar.gz
Algorithm Hash digest
SHA256 bdbd852df92af7d9fb6efb2f5f1339bd1e9893214faf66242e6b8bb150fe90e7
MD5 c69512b5c9909f883e6e40a25c8fb923
BLAKE2b-256 e7cec956564f39fbb92dc44995ab7e09030bbab692e429b6b3759d50480be13d

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: eventcounter-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 4.7 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0ed99576a5101ec1fe53a84e95877b176f13b6d6261f377ac67b8611eadd7c27
MD5 4f62f789ec97e7b1b1f531d8fde9cc5c
BLAKE2b-256 1c4fb2d4027dcf3d7dd007751611503fbf3288b760a269f839f649b1630cbd92

See more details on using hashes here.

Provenance

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