Skip to main content

Compteur

I use Python scripts in crontab. Sometimes, a script crashes, and I receive an email with the error.
But it can be a random crash and I do not need to know it, as it will not crash next time the script is launched.

Goal of this package is to track how many times an error occurs. I can define a limit of # errors before warning me.

Exemple

#!/usr/bin/env python3
from compteur import Compteur

cpt = Compteur('smartname')

try:
    # My wonderful script
except:
    cpt.inc()
    if cpt.isLimit():
        raise
else:
    cpt.reset()
finally:
    # do something

Metadata

Release files for compteur 1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for compteur 1.1
File Size Uploaded Provenance
compteur-1.1.tar.gz 3.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for compteur 1.1
File Interpreter ABI Platform
compteur-1.1-py3-none-any.whl Python 3 none any Details

Total release size: 6.3 kB

Release files / compteur-1.1.tar.gz

Download URL compteur-1.1.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
14ff0df3461b70815e9c2eee64658814b4524ca135b5a4088f78cae62a18527e
BLAKE2b-256 checksum
How to use checksums
b036302ce7c4debdd5715e6922d4d9834e5f23040801046c374a3918ffbb5094
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.9.19

Release files / compteur-1.1-py3-none-any.whl

Download URL compteur-1.1-py3-none-any.whl
Size 3.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
332eaead21f21daa9dc3050dd310f3c3dadb6f9f3eda650452e554d111918e41
BLAKE2b-256 checksum
How to use checksums
847c53d6c019ecdc177927e0b7d9988d1b419a38b26408441aed255bf51729eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.9.19

Security for compteur 1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page