colortimelog


Namecolortimelog JSON
Version 0.0.9 PyPI version JSON
download
home_pagehttps://github.com/wq2012/colortimelog
SummaryA util for logging the time elapsed for a task.
upload_time2024-09-21 18:49:46
maintainerNone
docs_urlNone
authorQuan Wang
requires_pythonNone
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # colortimelog: A util for logging the time elapsed for a task

[![Python package](https://github.com/wq2012/colortimelog/actions/workflows/python-package.yml/badge.svg)](https://github.com/wq2012/colortimelog/actions/workflows/python-package.yml)
[![PyPI Version](https://img.shields.io/pypi/v/colortimelog.svg)](https://pypi.python.org/pypi/colortimelog)
[![Python Versions](https://img.shields.io/pypi/pyversions/colortimelog.svg)](https://pypi.org/project/colortimelog)
[![Downloads](https://static.pepy.tech/badge/colortimelog)](https://www.pepy.tech/projects/colortimelog)

## Install

```
pip install colortimelog
```

## Usage

Add timing for a function:

```python
import colortimelog

@colortimelog.timefunc
def my_function():
  ...
```

Add timeing for a block of code:

```python
import colortimelog

with colortimelog.timeblock("Doing XYC"):
  do_x()
  do_y()
  do_z()
```

Logging with verbosity control:

```python
import colortimelog

logger = colortimelog.Logger(verbosity=3)
logger.error("This is an error")
logger.info("This is info")
logger.fatal("This will fail")
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/wq2012/colortimelog",
    "name": "colortimelog",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": "Quan Wang",
    "author_email": "quanw@google.com",
    "download_url": "https://files.pythonhosted.org/packages/6c/ba/37dcad0f028155ea1118fd113412433121ec6c709be97f7fdddb584c806d/colortimelog-0.0.9.tar.gz",
    "platform": null,
    "description": "# colortimelog: A util for logging the time elapsed for a task\n\n[![Python package](https://github.com/wq2012/colortimelog/actions/workflows/python-package.yml/badge.svg)](https://github.com/wq2012/colortimelog/actions/workflows/python-package.yml)\n[![PyPI Version](https://img.shields.io/pypi/v/colortimelog.svg)](https://pypi.python.org/pypi/colortimelog)\n[![Python Versions](https://img.shields.io/pypi/pyversions/colortimelog.svg)](https://pypi.org/project/colortimelog)\n[![Downloads](https://static.pepy.tech/badge/colortimelog)](https://www.pepy.tech/projects/colortimelog)\n\n## Install\n\n```\npip install colortimelog\n```\n\n## Usage\n\nAdd timing for a function:\n\n```python\nimport colortimelog\n\n@colortimelog.timefunc\ndef my_function():\n  ...\n```\n\nAdd timeing for a block of code:\n\n```python\nimport colortimelog\n\nwith colortimelog.timeblock(\"Doing XYC\"):\n  do_x()\n  do_y()\n  do_z()\n```\n\nLogging with verbosity control:\n\n```python\nimport colortimelog\n\nlogger = colortimelog.Logger(verbosity=3)\nlogger.error(\"This is an error\")\nlogger.info(\"This is info\")\nlogger.fatal(\"This will fail\")\n```\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A util for logging the time elapsed for a task.",
    "version": "0.0.9",
    "project_urls": {
        "Homepage": "https://github.com/wq2012/colortimelog"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d8d119838ff15892f01bcaf58d3d69856686265f85532aeb1c5df1a6fdbb349a",
                "md5": "6d1d887bc356c9c531107f84801fd741",
                "sha256": "0c8462a4853108fdaeab2f89f968af2b53eef8e1af95d464452b6bfaf56eaa53"
            },
            "downloads": -1,
            "filename": "colortimelog-0.0.9-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6d1d887bc356c9c531107f84801fd741",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 7890,
            "upload_time": "2024-09-21T18:49:45",
            "upload_time_iso_8601": "2024-09-21T18:49:45.657660Z",
            "url": "https://files.pythonhosted.org/packages/d8/d1/19838ff15892f01bcaf58d3d69856686265f85532aeb1c5df1a6fdbb349a/colortimelog-0.0.9-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6cba37dcad0f028155ea1118fd113412433121ec6c709be97f7fdddb584c806d",
                "md5": "307ed780bc408dc955854f8084e70b76",
                "sha256": "d54cbe201992b1b501a84db39a692498e6704d0afd4c294aa1fd4170069d160b"
            },
            "downloads": -1,
            "filename": "colortimelog-0.0.9.tar.gz",
            "has_sig": false,
            "md5_digest": "307ed780bc408dc955854f8084e70b76",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 7159,
            "upload_time": "2024-09-21T18:49:46",
            "upload_time_iso_8601": "2024-09-21T18:49:46.866276Z",
            "url": "https://files.pythonhosted.org/packages/6c/ba/37dcad0f028155ea1118fd113412433121ec6c709be97f7fdddb584c806d/colortimelog-0.0.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-21 18:49:46",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "wq2012",
    "github_project": "colortimelog",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "colortimelog"
}
        
Elapsed time: 0.28131s