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.4.tar.gz (7.4 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.4-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: eventcounter-0.4.4.tar.gz
  • Upload date:
  • Size: 7.4 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.4.tar.gz
Algorithm Hash digest
SHA256 f0b07683286f5b8842ef878ec4aa5febcbc6b5a18540c623d190fcd50f12fa38
MD5 e8a3b467303e7a644bb70db032d08293
BLAKE2b-256 5287a0bde0933318e187eee2b48247c8c7c2cd6c55329cf1aef617c05e5b61fd

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: eventcounter-0.4.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 62a36b11591a616ebd497e86e192a77198d9459757574f78fcd6dc8653339ea3
MD5 48aba06155a26a9aae575c504d6588e5
BLAKE2b-256 cdf8ef969f2dcf911be41c7dffcfbe3324b56ae271ca7f8fb56e8320a46933a5

See more details on using hashes here.

Provenance

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