{ "info": { "author": "Will Roberts", "author_email": "wildwilhelm@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Text Processing" ], "description": "=====================================\n pytimeparse: time expression parser\n=====================================\n\n.. note::\n This is a fork of `pytimeparse `_. Only changes being support for months and years.\n This was specifically forked for use in piqueserver.\n\n.. image:: https://travis-ci.org/wroberts/pytimeparse.svg?branch=master\n :target: https://travis-ci.org/wroberts/pytimeparse\n :alt: Travis CI build status\n\n.. image:: https://coveralls.io/repos/wroberts/pytimeparse/badge.svg\n :target: https://coveralls.io/r/wroberts/pytimeparse\n :alt: Test code coverage\n\n.. image:: https://img.shields.io/pypi/v/pytimeparse.svg\n :target: https://pypi.python.org/pypi/pytimeparse/\n :alt: Latest Version\n\nCopyright (c) 2014 Will Roberts \n\nLicensed under the MIT License (see source file ``timeparse.py`` for\ndetails).\n\nA small Python library to parse various kinds of time expressions,\ninspired by\n`this StackOverflow question `_.\n\nThe single function ``pytimeparse.timeparse.timeparse`` defined in the\nlibrary (also available as ``pytimeparse.parse``) parses time\nexpressions like the following:\n\n- ``32m``\n- ``2h32m``\n- ``3d2h32m``\n- ``1w3d2h32m``\n- ``1w 3d 2h 32m``\n- ``1 w 3 d 2 h 32 m``\n- ``4:13``\n- ``4:13:02``\n- ``4:13:02.266``\n- ``2:04:13:02.266``\n- ``2 days, 4:13:02`` (``uptime`` format)\n- ``2 days, 4:13:02.266``\n- ``5hr34m56s``\n- ``5 hours, 34 minutes, 56 seconds``\n- ``5 hrs, 34 mins, 56 secs``\n- ``2 days, 5 hours, 34 minutes, 56 seconds``\n- ``1.2 m``\n- ``1.2 min``\n- ``1.2 mins``\n- ``1.2 minute``\n- ``1.2 minutes``\n- ``172 hours``\n- ``172 hr``\n- ``172 h``\n- ``172 hrs``\n- ``172 hour``\n- ``1.24 days``\n- ``5 d``\n- ``5 day``\n- ``5 days``\n- ``5.6 wk``\n- ``5.6 week``\n- ``5.6 weeks``\n\nIt returns the time as a number of seconds (an integer value if\npossible, otherwise a floating-point number)::\n\n >>> from pytimeparse import parse\n >>> parse('1.2 minutes')\n 72\n\nA number of seconds can be converted back into a string using the\n``datetime`` module in the standard library, as noted in\n`this other StackOverflow question `_::\n\n >>> from pytimeparse import parse\n >>> import datetime\n >>> parse('1 day, 14:20:16')\n 138016\n >>> str(datetime.timedelta(seconds=138016))\n '1 day, 14:20:16'\n\nFuture work\n-----------\n\n1. Give the user more flexibility over which characters to use as\n separators between fields in a time expression (e.g., ``+`` might\n be useful).\n2. Internationalisation?\n3. Wow, https://github.com/bear/parsedatetime .\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/godwhoa/pytimeparse", "keywords": "time parsing parser", "license": "License :: OSI Approved :: MIT License", "maintainer": "Joseph Daniel", "maintainer_email": "gjdaniel1999@gmail.com", "name": "timeparse-plus", "package_url": "https://pypi.org/project/timeparse-plus/", "platform": "", "project_url": "https://pypi.org/project/timeparse-plus/", "project_urls": { "Homepage": "https://github.com/godwhoa/pytimeparse" }, "release_url": "https://pypi.org/project/timeparse-plus/1.2.0/", "requires_dist": null, "requires_python": "", "summary": "Time expression parser", "version": "1.2.0" }, "last_serial": 4485873, "releases": { "1.1.8": [ { "comment_text": "", "digests": { "md5": "65e4232cfdfb0eae9cebbf40496f7576", "sha256": "173ec4b477fd0e53ba0ee599d3e6996aba844a3f8af4a3eb8aa6188dfd93fa3a" }, "downloads": -1, "filename": "timeparse_plus-1.1.8-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "65e4232cfdfb0eae9cebbf40496f7576", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8986, "upload_time": "2018-11-14T14:38:45", "url": "https://files.pythonhosted.org/packages/48/54/c0cb9e189ebe97edb6d107e9430b6bd41da2b814385245ce1e4392085c6a/timeparse_plus-1.1.8-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "03a6ca36055782eb2e7fa56487633eee", "sha256": "4cb1e97a9dce596eb469e6acc88412ffe43bc00b14f47bc3918a1cc1f4d204cb" }, "downloads": -1, "filename": "timeparse-plus-1.1.8.tar.gz", "has_sig": false, "md5_digest": "03a6ca36055782eb2e7fa56487633eee", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10093, "upload_time": "2018-11-14T14:38:49", "url": "https://files.pythonhosted.org/packages/99/ab/88897c3df259728843f56759ca6acae867737acb3ab37421575dd67fc793/timeparse-plus-1.1.8.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "6224189ed6719966ca0f6b8044a1acb2", "sha256": "91f4b916184303109175e41d603f6d6a8acacb6a2eb627462936f0ea776cfaf8" }, "downloads": -1, "filename": "timeparse_plus-1.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6224189ed6719966ca0f6b8044a1acb2", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9029, "upload_time": "2018-11-14T14:38:47", "url": "https://files.pythonhosted.org/packages/0e/20/e4a0ceb280635d5391cf6c0112b0edb730009f3e4385e85e7349ccceef6a/timeparse_plus-1.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f37cacf5476324495052371143dcafff", "sha256": "e559a3485f25e274449706ec3323c9a7b50616779c9c8cbf823c2a6e046d5889" }, "downloads": -1, "filename": "timeparse-plus-1.2.0.tar.gz", "has_sig": false, "md5_digest": "f37cacf5476324495052371143dcafff", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10186, "upload_time": "2018-11-14T14:38:51", "url": "https://files.pythonhosted.org/packages/6b/9a/3b539d192d478d29e1768e91ccd376950d9c9c8e7e95b4dada94406dba3a/timeparse-plus-1.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6224189ed6719966ca0f6b8044a1acb2", "sha256": "91f4b916184303109175e41d603f6d6a8acacb6a2eb627462936f0ea776cfaf8" }, "downloads": -1, "filename": "timeparse_plus-1.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6224189ed6719966ca0f6b8044a1acb2", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9029, "upload_time": "2018-11-14T14:38:47", "url": "https://files.pythonhosted.org/packages/0e/20/e4a0ceb280635d5391cf6c0112b0edb730009f3e4385e85e7349ccceef6a/timeparse_plus-1.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f37cacf5476324495052371143dcafff", "sha256": "e559a3485f25e274449706ec3323c9a7b50616779c9c8cbf823c2a6e046d5889" }, "downloads": -1, "filename": "timeparse-plus-1.2.0.tar.gz", "has_sig": false, "md5_digest": "f37cacf5476324495052371143dcafff", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10186, "upload_time": "2018-11-14T14:38:51", "url": "https://files.pythonhosted.org/packages/6b/9a/3b539d192d478d29e1768e91ccd376950d9c9c8e7e95b4dada94406dba3a/timeparse-plus-1.2.0.tar.gz" } ] }