{ "info": { "author": "Eugene Kalinin", "author_email": "e.v.kalinin@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "marktime.py\n===========\n\nSimple python module for mark time.\n\nInspired by two functions from node.js:\n\n * `console.time `_\n * `console.timeEnd `_\n\nMain features:\n\n * easy to use\n * no external dependencies\n * 100% test coverage\n * works with Python 2.7 and 3.3\n\n\nUsage\n-----\n\n.. code-block:: bash\n\n $ pip install marktime\n\n.. code-block:: python\n\n import marktime\n\n marktime.start('some task')\n marktime.start('some another task')\n\n marktime.stop('some task')\n 8.757422924041748\n\n marktime.stop('some another task').seconds\n 14.805735111236572\n\n marktime.duration('some another task').msecs\n 14805.735111236572\n\n marktime.start('some task # 3')\n\n with marktime.stopwatch('some task # 4'):\n marktime.time.sleep(1)\n\n import json\n print json.dumps(marktime.labels, indent=4)\n {\n \"some another task\": {\n \"duration\": 14.805735111236572,\n \"start_time\": 1370453758.064955,\n \"end_time\": 1370453772.87069\n },\n \"some task # 3\": {\n \"start_time\": 1370453892.025603,\n \"end_time\": None\n },\n \"some task # 4\": {\n \"duration\": 1.00120210647583,\n \"start_time\": 1370638027.000799,\n \"end_time\": 1370638028.002001\n },\n \"some task\": {\n \"duration\": 8.757422924041748,\n \"start_time\": 1370453753.185846,\n \"end_time\": 1370453761.943269\n }\n }\n\n\nAPI\n---\n\n* **marktime.start** (label, at=None)\n\n * ``label`` \u2014 marker label. String. Required.\n * ``at`` \u2014 time to start the countdown. If ``None`` then uses ``time.time()``.\n\n* **marktime.stop** (label, remove_from_labels=False, stop_once=True)\n\n * ``label`` \u2014 marker label. String. Required.\n * ``at`` \u2014 time to stop the countdown. If ``None`` then uses ``time.time()``\n * ``remove_from_labels`` \u2014 if ``True`` then ``label`` removed from global\n dict ``marktime.labels``.\n * ``stop_once`` \u2014 if ``False`` and the countdown for the certain ``label``\n is allready stopped thet it stopped it again. And thereafter the duration\n for the certain ``label`` will be increased. \n\n* **marktime.duration** (label, stop_it=True, stop_at=None)\n\n * ``label`` \u2014 marker label. String. Required.\n * ``stop_it`` \u2014 if ``True`` then the countdown for the certain ``label``\n will be stopped. If ``False`` and the countdown for the certain ``label``\n is not stopped then returns ``None``.\n * ``stop_at`` \u2014 passed into ``stop`` function if ``stop_it`` == ``True``\n\n* **marktime.stopwatch** (label) \u2014 context manager (``with`` statement support)\n\n* **marktime.labels** \u2014 global ``dict`` that stores all the labels for time markers.\n\n\nLicense\n-------\n\nSee `LICENSE `_\nfile.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ekalinin/marktime.py", "keywords": "timer,stopwatch,time", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "marktime", "package_url": "https://pypi.org/project/marktime/", "platform": "any", "project_url": "https://pypi.org/project/marktime/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/ekalinin/marktime.py" }, "release_url": "https://pypi.org/project/marktime/0.2.0/", "requires_dist": null, "requires_python": null, "summary": "Python timer module for humans.", "version": "0.2.0" }, "last_serial": 762167, "releases": { "0.1.0": [], "0.1.1": [ { "comment_text": "", "digests": { "md5": "fff76e254366711787290dd52a32b81d", "sha256": "ef27c3e0c08dd656fc2895fe3ba3e0c764d25c8b83b0fd8098cbe548b30a156c" }, "downloads": -1, "filename": "marktime-0.1.1.tar.gz", "has_sig": false, "md5_digest": "fff76e254366711787290dd52a32b81d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2863, "upload_time": "2013-06-06T12:51:06", "url": "https://files.pythonhosted.org/packages/d2/e2/b45d200f23f552f0acfb955584cda2bf7bc106b8d51715012b311c754bb0/marktime-0.1.1.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "1f2650b9bbc1226dbc05ea0696a4e382", "sha256": "2006f6cb9a649c537137bf9be617d8ad524ecaaa352b509a903578aceb983ffd" }, "downloads": -1, "filename": "marktime-0.2.0.tar.gz", "has_sig": false, "md5_digest": "1f2650b9bbc1226dbc05ea0696a4e382", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3228, "upload_time": "2013-06-07T21:08:28", "url": "https://files.pythonhosted.org/packages/14/00/122c8fa4edebc084ae0273ed24079d10656d3d323e1e7a19d8e69b9d2002/marktime-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1f2650b9bbc1226dbc05ea0696a4e382", "sha256": "2006f6cb9a649c537137bf9be617d8ad524ecaaa352b509a903578aceb983ffd" }, "downloads": -1, "filename": "marktime-0.2.0.tar.gz", "has_sig": false, "md5_digest": "1f2650b9bbc1226dbc05ea0696a4e382", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3228, "upload_time": "2013-06-07T21:08:28", "url": "https://files.pythonhosted.org/packages/14/00/122c8fa4edebc084ae0273ed24079d10656d3d323e1e7a19d8e69b9d2002/marktime-0.2.0.tar.gz" } ] }