{ "info": { "author": "Alexander Paramonov", "author_email": "alex@paramono.com", "bugtrack_url": null, "classifiers": [ "Environment :: Console", "Environment :: Plugins", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4" ], "description": "========\nduration\n========\n\npython time duration conversion module\n\nInstallation\n------------\n\n::\n\n pip install duration\n\n\nUsage\n-----\n\nExamples below show how to convert timestamps in ``hh:mm:ss`` and ``mm:ss`` format\nto iso8601 strings, integer seconds, datetime.timedelta objects and \n(hours, minutes, seconds,) deltas\n\n.. code:: python\n\n from duration import (\n to_iso8601,\n to_seconds,\n to_timedelta,\n to_tuple,\n )\n\n time = '1:23:45'\n\n iso8601 = to_iso8601(time) # 'PT01H23M45S'\n seconds = to_seconds(time) # 5025\n td = to_timedelta(time) # timedelta(hours=1, minutes=23, seconds=45)\n tuple_ = to_tuple(time) # (1, 23, 45,)\n\nExamples above use strict mode by default. In strict mode, conversion \nfunctions raise ``StrictnessError`` if your duration string meets one of the\nfollowing conditions:\n\n1. hh > 23\n2. mm > 59\n3. ss > 59\n\nTo disable strict mode, pass ``strict=False`` to the conversion function\n\n.. code:: python\n\n from duration import (\n to_iso8601,\n to_seconds,\n to_timedelta,\n to_tuple,\n )\n\n time = '24:83:25'\n\n iso8601 = to_iso8601(time, strict=False) # 'P1DT01H23M25S'\n seconds = to_seconds(time, strict=False) # 91405\n td = to_timedelta(time, strict=False) # timedelta(seconds=91405)\n tuple_ = to_tuple(time, strict=False) # (25, 23, 25,)", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/paramono/duration", "keywords": "", "license": "BSD License", "maintainer": "", "maintainer_email": "", "name": "duration", "package_url": "https://pypi.org/project/duration/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/duration/", "project_urls": { "Homepage": "https://github.com/paramono/duration" }, "release_url": "https://pypi.org/project/duration/1.1.1/", "requires_dist": null, "requires_python": "", "summary": "python time duration conversion module", "version": "1.1.1" }, "last_serial": 2170602, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "3e2e02557eb38cddf4c385c489186660", "sha256": "28c40a2f164aeec6fc2ce69c4ea494b6ae2ff5923beb135f6c1075446ce54ec1" }, "downloads": -1, "filename": "duration-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "3e2e02557eb38cddf4c385c489186660", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4451, "upload_time": "2016-06-16T07:26:12", "url": "https://files.pythonhosted.org/packages/75/0d/b64ab3e87d941cbfd33e34796203107aa299e237f356074bb245cc5e2f4a/duration-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "88e577305e95d34fcc8d05f0ae06b7ec", "sha256": "55ec39e63501c9855f30bb928886f0d33bccb5344402bf924363d6ae0820e597" }, "downloads": -1, "filename": "duration-1.0.0.tar.gz", "has_sig": false, "md5_digest": "88e577305e95d34fcc8d05f0ae06b7ec", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3877, "upload_time": "2016-06-16T07:26:16", "url": "https://files.pythonhosted.org/packages/13/92/66185e6f6c4ea1f5f8003d980c83e9a0bfa8823e01b4cd8914ab55b96df1/duration-1.0.0.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "34444c63ff654c7ad7b94c6934bbb172", "sha256": "c9a6492af00c4de960a5ff818df74a11779cfd316614d62e7cf4174f479d933f" }, "downloads": -1, "filename": "duration-1.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "34444c63ff654c7ad7b94c6934bbb172", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5193, "upload_time": "2016-06-16T10:37:38", "url": "https://files.pythonhosted.org/packages/c1/58/d38108f45eb7802c2879c687ed0511813981a5fd6ca7ed2c16f1b74e731e/duration-1.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "66d28997e7ea754ee47f3b956bb69217", "sha256": "6bdb30ab9871a7d05564c5585f3be37ec9a7a90269cf79196014a8f98497fd83" }, "downloads": -1, "filename": "duration-1.1.0.tar.gz", "has_sig": false, "md5_digest": "66d28997e7ea754ee47f3b956bb69217", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4346, "upload_time": "2016-06-16T10:37:30", "url": "https://files.pythonhosted.org/packages/82/a6/eddaa9f2ad9d0cdadf180a94cb2f38253bf693af58f4fccc59cd0e5d0077/duration-1.1.0.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "29a9737fde2ea166a571e162b28c63a6", "sha256": "1ef455d5dccc3933b45d1af54bca837240fd185fe24da259df34865d78749960" }, "downloads": -1, "filename": "duration-1.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "29a9737fde2ea166a571e162b28c63a6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5160, "upload_time": "2016-06-16T10:49:02", "url": "https://files.pythonhosted.org/packages/6b/70/eccf8b3115bf458997ae0f15da9d571deb827b252010cf703ae92d2a9739/duration-1.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d06d3939509daeecd919fcdc49c08bc4", "sha256": "5eb44e3bd829726937803a9c6e80e102dee1e14b153530bc5c6b65ced3a934bc" }, "downloads": -1, "filename": "duration-1.1.1.tar.gz", "has_sig": false, "md5_digest": "d06d3939509daeecd919fcdc49c08bc4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4309, "upload_time": "2016-06-16T10:48:53", "url": "https://files.pythonhosted.org/packages/66/25/2ce4bb6dff9c3a3989c35f89876ddbc0fb56fc8e2cf07a7add840521145a/duration-1.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "29a9737fde2ea166a571e162b28c63a6", "sha256": "1ef455d5dccc3933b45d1af54bca837240fd185fe24da259df34865d78749960" }, "downloads": -1, "filename": "duration-1.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "29a9737fde2ea166a571e162b28c63a6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5160, "upload_time": "2016-06-16T10:49:02", "url": "https://files.pythonhosted.org/packages/6b/70/eccf8b3115bf458997ae0f15da9d571deb827b252010cf703ae92d2a9739/duration-1.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d06d3939509daeecd919fcdc49c08bc4", "sha256": "5eb44e3bd829726937803a9c6e80e102dee1e14b153530bc5c6b65ced3a934bc" }, "downloads": -1, "filename": "duration-1.1.1.tar.gz", "has_sig": false, "md5_digest": "d06d3939509daeecd919fcdc49c08bc4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4309, "upload_time": "2016-06-16T10:48:53", "url": "https://files.pythonhosted.org/packages/66/25/2ce4bb6dff9c3a3989c35f89876ddbc0fb56fc8e2cf07a7add840521145a/duration-1.1.1.tar.gz" } ] }