stopwatch.py


Namestopwatch.py JSON
Version 2.0.1 PyPI version JSON
download
home_pagehttps://github.com/ravener/stopwatch.py
SummaryA simple stopwatch for python
upload_time2022-09-04 17:15:43
maintainer
docs_urlNone
authorRavener
requires_python>=3.5
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Stopwatch.py
============
A simple stopwatch for Python.

Install
-------
Requires Python 3.5+

.. code:: sh

   pip install stopwatch.py

Usage
-----
.. code:: py

    from stopwatch import Stopwatch

    # Argument specifies decimal precision for __str__
    # e.g 2 digits = 1.00, 3 digits = 1.000
    # Optional, defaults to 2
    stopwatch = Stopwatch(2) # Start a stopwatch
    # It's just math with time.perf_counter() so there isn't really a task
    # running in background

    stopwatch.stop() # Stop stopwatch, time freezes
    stopwatch.start() # Start it again
    stopwatch.reset() # Reset it back to 0
    stopwatch.restart() # Reset and start again
    stopwatch.running # Whether stopwatch is running
    stopwatch.duration # Get the duration (in seconds)
    str(stopwatch) # Get a friendly duration string

License
-------
MIT



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ravener/stopwatch.py",
    "name": "stopwatch.py",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.5",
    "maintainer_email": "",
    "keywords": "",
    "author": "Ravener",
    "author_email": "ravener.anime@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/8d/14/1815e24c29c2f2ea1e8cb17ae72357c1151af02b9137b29ccab973ec7f73/stopwatch.py-2.0.1.tar.gz",
    "platform": null,
    "description": "Stopwatch.py\n============\nA simple stopwatch for Python.\n\nInstall\n-------\nRequires Python 3.5+\n\n.. code:: sh\n\n   pip install stopwatch.py\n\nUsage\n-----\n.. code:: py\n\n    from stopwatch import Stopwatch\n\n    # Argument specifies decimal precision for __str__\n    # e.g 2 digits = 1.00, 3 digits = 1.000\n    # Optional, defaults to 2\n    stopwatch = Stopwatch(2) # Start a stopwatch\n    # It's just math with time.perf_counter() so there isn't really a task\n    # running in background\n\n    stopwatch.stop() # Stop stopwatch, time freezes\n    stopwatch.start() # Start it again\n    stopwatch.reset() # Reset it back to 0\n    stopwatch.restart() # Reset and start again\n    stopwatch.running # Whether stopwatch is running\n    stopwatch.duration # Get the duration (in seconds)\n    str(stopwatch) # Get a friendly duration string\n\nLicense\n-------\nMIT\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A simple stopwatch for python",
    "version": "2.0.1",
    "project_urls": {
        "Homepage": "https://github.com/ravener/stopwatch.py"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7a6516e128bfa30b4d63362c5ead733bc5a95c2b4241a0a193dc44e290ab2080",
                "md5": "b5d317f6900aa2c242511d5ad2493a48",
                "sha256": "5802a0178d766120c11dd5df8ae838e9beccb8c88329dbd5f0f7ac4b7fed9107"
            },
            "downloads": -1,
            "filename": "stopwatch.py-2.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b5d317f6900aa2c242511d5ad2493a48",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.5",
            "size": 3601,
            "upload_time": "2022-09-04T17:15:37",
            "upload_time_iso_8601": "2022-09-04T17:15:37.542109Z",
            "url": "https://files.pythonhosted.org/packages/7a/65/16e128bfa30b4d63362c5ead733bc5a95c2b4241a0a193dc44e290ab2080/stopwatch.py-2.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8d141815e24c29c2f2ea1e8cb17ae72357c1151af02b9137b29ccab973ec7f73",
                "md5": "a682d3a86e2d779e8e560f9dfe27d1ed",
                "sha256": "8cc94ba0f6469d434eabd8b227166e595fd42350e7f66dbf1a1a80697f60cc79"
            },
            "downloads": -1,
            "filename": "stopwatch.py-2.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "a682d3a86e2d779e8e560f9dfe27d1ed",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.5",
            "size": 2796,
            "upload_time": "2022-09-04T17:15:43",
            "upload_time_iso_8601": "2022-09-04T17:15:43.861403Z",
            "url": "https://files.pythonhosted.org/packages/8d/14/1815e24c29c2f2ea1e8cb17ae72357c1151af02b9137b29ccab973ec7f73/stopwatch.py-2.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-09-04 17:15:43",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ravener",
    "github_project": "stopwatch.py",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "stopwatch.py"
}
        
Elapsed time: 0.20878s