Compteur


NameCompteur JSON
Version 0.1 PyPI version JSON
download
home_pagehttps://github.com/OlivierProTips/Compteur
SummaryCount how many time errors occur
upload_time2024-04-04 11:44:42
maintainerNone
docs_urlNone
authorOlivireProTips
requires_pythonNone
licenseMIT
keywords compteur error count track
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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

```python
#!/usr/bin/env python3
from Compteur import Compteur

cpt = Compteur('htb')

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

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/OlivierProTips/Compteur",
    "name": "Compteur",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "Compteur, error, count, track",
    "author": "OlivireProTips",
    "author_email": "olivierprotips@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/4e/90/02d7e11599d2c072a0e1a6783866f7ba60833cf5a03df1aca1b2803f2709/Compteur-0.1.tar.gz",
    "platform": null,
    "description": "# Compteur\n\nI use Python scripts in crontab. Sometimes, a script crashes, and I receive an email with the error.  \nBut 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.\n\nGoal of this package is to track how many times an error occurs. I can define a limit of # errors before warning me.\n\n## Exemple\n\n```python\n#!/usr/bin/env python3\nfrom Compteur import Compteur\n\ncpt = Compteur('htb')\n\ntry:\n    # My wonderful script\nexcept:\n    cpt.inc()\n    if cpt.isLimit():\n        raise\nelse:\n    cpt.reset()\nfinally:\n    # do something\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Count how many time errors occur",
    "version": "0.1",
    "project_urls": {
        "Download": "https://github.com/OlivierProTips/Compteur/archive/refs/tags/v0.1.tar.gz",
        "Homepage": "https://github.com/OlivierProTips/Compteur"
    },
    "split_keywords": [
        "compteur",
        " error",
        " count",
        " track"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a658cdec07fc7d49c4d3025cc5ba8d2f447a6e9d235d1d78423568af203f6f6f",
                "md5": "b5559664528f3adec117a9231a2724b1",
                "sha256": "67932f5656c6cc6b7c587c25976c6df447f7cc4ff630fed4a1bdf508d6ed5ab9"
            },
            "downloads": -1,
            "filename": "Compteur-0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b5559664528f3adec117a9231a2724b1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 3089,
            "upload_time": "2024-04-04T11:44:40",
            "upload_time_iso_8601": "2024-04-04T11:44:40.002563Z",
            "url": "https://files.pythonhosted.org/packages/a6/58/cdec07fc7d49c4d3025cc5ba8d2f447a6e9d235d1d78423568af203f6f6f/Compteur-0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4e9002d7e11599d2c072a0e1a6783866f7ba60833cf5a03df1aca1b2803f2709",
                "md5": "4e8df1c6d2a7db351e9864e8a2786fab",
                "sha256": "8877709ebf8c66cd1b09a7cfc4ad033944837ec286af7d77b7278a760666a96a"
            },
            "downloads": -1,
            "filename": "Compteur-0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "4e8df1c6d2a7db351e9864e8a2786fab",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 2778,
            "upload_time": "2024-04-04T11:44:42",
            "upload_time_iso_8601": "2024-04-04T11:44:42.138662Z",
            "url": "https://files.pythonhosted.org/packages/4e/90/02d7e11599d2c072a0e1a6783866f7ba60833cf5a03df1aca1b2803f2709/Compteur-0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-04 11:44:42",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "OlivierProTips",
    "github_project": "Compteur",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "compteur"
}
        
Elapsed time: 0.21499s