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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cfe94dfc46d4edf8e5ca6e067dfe192a826b4027b033ca08ce0f2d8c23306d9b
|
|
| MD5 |
992e23fdff7191ba2cb623de839190d6
|
|
| BLAKE2b-256 |
1bcdadd1310b98e00d53e3912a905250dcd18d4e89ebb35fc0cdfaeb63521162
|
Provenance
The following attestation bundles were made for eventcounter-0.4.2.tar.gz:
Publisher:
python-publish.yml on Jylpah/eventcounter
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
eventcounter-0.4.2.tar.gz -
Subject digest:
cfe94dfc46d4edf8e5ca6e067dfe192a826b4027b033ca08ce0f2d8c23306d9b - Sigstore transparency entry: 192828072
- Sigstore integration time:
-
Permalink:
Jylpah/eventcounter@e50d48dea25289801f0417c6dcefd5d875aedde1 -
Branch / Tag:
refs/tags/0.4.2 - Owner: https://github.com/Jylpah
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@e50d48dea25289801f0417c6dcefd5d875aedde1 -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53bfdd5130fae941480d5aaad26de0a0e3218072d57442bb3981b799f0b19431
|
|
| MD5 |
83fa1570e5a2f136eb6401dbe6e8ddd8
|
|
| BLAKE2b-256 |
f3c34abf3fcbf34cd846eec319e29adb71d9e12c30f9d45999d4fa4b34a579eb
|
Provenance
The following attestation bundles were made for eventcounter-0.4.2-py3-none-any.whl:
Publisher:
python-publish.yml on Jylpah/eventcounter
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
eventcounter-0.4.2-py3-none-any.whl -
Subject digest:
53bfdd5130fae941480d5aaad26de0a0e3218072d57442bb3981b799f0b19431 - Sigstore transparency entry: 192828073
- Sigstore integration time:
-
Permalink:
Jylpah/eventcounter@e50d48dea25289801f0417c6dcefd5d875aedde1 -
Branch / Tag:
refs/tags/0.4.2 - Owner: https://github.com/Jylpah
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@e50d48dea25289801f0417c6dcefd5d875aedde1 -
Trigger Event:
release
-
Statement type: