{ "info": { "author": "Tsuyoshi Hombashi", "author_email": "tsuyoshi.hombashi@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Intended Audience :: Information Technology", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Text Processing" ], "description": ".. contents:: **humanreadable**\n :backlinks: top\n :depth: 2\n\n\nSummary\n============================================\nhumanreadable is a Python library to convert from human-readable values to Python values.\n\n.. image:: https://badge.fury.io/py/humanreadable.svg\n :target: https://badge.fury.io/py/humanreadable\n :alt: PyPI package version\n\n.. image:: https://img.shields.io/pypi/pyversions/humanreadable.svg\n :target: https://pypi.org/project/humanreadable\n :alt: Supported Python versions\n\n.. image:: https://img.shields.io/travis/thombashi/humanreadable/master.svg?label=Linux%20CI\n :target: https://travis-ci.org/thombashi/humanreadable\n :alt: Linux CI status\n\n.. image:: https://img.shields.io/appveyor/ci/thombashi/humanreadable/master.svg?label=Windows%20CI\n :target: https://ci.appveyor.com/project/thombashi/humanreadable\n\n.. image:: https://coveralls.io/repos/github/thombashi/humanreadable/badge.svg?branch=master\n :target: https://coveralls.io/github/thombashi/humanreadable?branch=master\n :alt: Test coverage\n\n\nSupported Unites\n-------------------------------------------\n- time (days, hours, minutes, seconds, ...)\n- bit per seconds\n\n\nUsage\n============================================\n\nBasic usages\n-------------------------------------------\n:Sample Code:\n .. code-block:: python\n\n import humanreadable as hr\n\n print(\"\\n[Examples: humanreadable.Time]\")\n value = \"120 sec\"\n print(\"'{}' to msecs -> {}\".format(value, hr.Time(value).milliseconds))\n print(\"'{}' to minutes -> {}\".format(value, hr.Time(value).minutes))\n\n print(\"\\n[Examples: humanreadable.BitPerSecond]\")\n value = \"1 Gbps\"\n print(\"'{}' to Mbps -> {}\".format(value, hr.BitPerSecond(value).mega_bps))\n print(\"'{}' to Kbps -> {}\".format(value, hr.BitPerSecond(value).kilo_bps))\n print(\"'{}' to Kibps -> {}\".format(value, hr.BitPerSecond(value).kibi_bps))\n\n:Output:\n .. code-block::\n\n [Examples: humanreadable.Time]\n '120 sec' to msecs -> 120000.0\n '120 sec' to minutes -> 2.0\n\n [Examples: humanreadable.BitPerSecond]\n '1 Gbps' to Mbps -> 1000.0\n '1 Gbps' to Kbps -> 1000000.0\n '1 Gbps' to Kibps -> 953674.31640625\n\n\nSet default unit\n-------------------------------------------\n:Sample Code:\n .. code-block:: python\n\n import humanreadable as hr\n\n print(hr.Time(\"1\", default_unit=hr.Time.Unit.SECOND))\n\n:Output:\n .. code-block::\n\n 1.0 seconds\n\n\nUnits\n-------------------------------------------\n.. table:: Available units for ``humanreadable.Time``\n\n +------------+----------------------------------------------------------+\n | Unit | Available specifiers (str) |\n +============+==========================================================+\n |days |``d``/``day``/``days`` |\n +------------+----------------------------------------------------------+\n |hours |``h``/``hour``/``hours`` |\n +------------+----------------------------------------------------------+\n |minutes |``m``/``min``/``mins``/``minute``/``minutes`` |\n +------------+----------------------------------------------------------+\n |seconds |``s``/``sec``/``secs``/``second``/``seconds`` |\n +------------+----------------------------------------------------------+\n |milliseconds|``ms``/``msec``/``msecs``/``millisecond``/``milliseconds``|\n +------------+----------------------------------------------------------+\n |microseconds|``us``/``usec``/``usecs``/``microsecond``/``microseconds``|\n +------------+----------------------------------------------------------+\n\n.. table:: Available units for ``humanreadable.BitPerSecond``\n\n +-----+---------------------------+\n |Unit |Available specifiers (str) |\n +=====+===========================+\n |bps |``bps``/``bit/s`` |\n +-----+---------------------------+\n |Kbps |``[kK]bps``/``[kK]bit/s`` |\n +-----+---------------------------+\n |Kibps|``[kK]ibps``/``[kK]ibit/s``|\n +-----+---------------------------+\n |Mbps |``[mM]bps``/``[mM]bit/s`` |\n +-----+---------------------------+\n |Mibps|``[mM]ibps``/``[mM]ibit/s``|\n +-----+---------------------------+\n |Gbps |``[gG]bps``/``[gG]bit/s`` |\n +-----+---------------------------+\n |Gibps|``[gG]ibps``/``[gG]ibit/s``|\n +-----+---------------------------+\n |Tbps |``[tT]bps``/``[tT]bit/s`` |\n +-----+---------------------------+\n |Tibps|``[tT]ibps``/``[tT]ibit/s``|\n +-----+---------------------------+\n\n\nInstallation\n============================================\nInstall from PyPI\n------------------------------\n::\n\n pip install humanreadable\n\nInstall from PPA (for Ubuntu)\n------------------------------\n::\n\n sudo add-apt-repository ppa:thombashi/ppa\n sudo apt update\n sudo apt install python3-humanreadable\n\n\nDependencies\n============================================\nPython 2.7+ or 3.5+\n\n- `six `__\n- `typepy `__\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/thombashi/humanreadable", "keywords": "human-readable,converter", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "humanreadable", "package_url": "https://pypi.org/project/humanreadable/", "platform": "", "project_url": "https://pypi.org/project/humanreadable/", "project_urls": { "Homepage": "https://github.com/thombashi/humanreadable", "Source": "https://github.com/thombashi/humanreadable", "Tracker": "https://github.com/thombashi/humanreadable/issues" }, "release_url": "https://pypi.org/project/humanreadable/0.0.7/", "requires_dist": [ "setuptools (>=38.3.0)", "six (<2.0.0,>=1.10.0)", "typepy (<1.0.0,>=0.6.0)", "twine ; extra == 'build'", "wheel ; extra == 'build'", "releasecmd (<0.1.0,>=0.0.18) ; extra == 'release'", "pytest ; extra == 'test'" ], "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*", "summary": "humanreadable is a Python library to convert from human-readable values to Python values.", "version": "0.0.7" }, "last_serial": 5256151, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "4fb66324bd11ac41183fbceea8cb297c", "sha256": "f337eb29f7fcbe00ef11a52b4dfc8dd276c5e7c2013aef883e5022d79a906ec7" }, "downloads": -1, "filename": "humanreadable-0.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "4fb66324bd11ac41183fbceea8cb297c", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 8263, "upload_time": "2019-03-16T11:10:12", "url": "https://files.pythonhosted.org/packages/a5/39/5b4b87d91cc8b1dd2128f03d10bd8750e120e41ed4b11ba2fc6cfcbaa25d/humanreadable-0.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f2872027a153f798ebd778fa5b049db5", "sha256": "9a07434a82ec842052e5dc2f4fc2730352adf1b505627aeaaeeda7e813f7f6c6" }, "downloads": -1, "filename": "humanreadable-0.0.1.tar.gz", "has_sig": false, "md5_digest": "f2872027a153f798ebd778fa5b049db5", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 8688, "upload_time": "2019-03-16T11:10:14", "url": "https://files.pythonhosted.org/packages/9d/ef/62d8c2bb8d15069cc94d4a290dc4c03d024958b5f5e35535a2ed4c8c3dcf/humanreadable-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "1957759e64b13624552b54eb930c2d6d", "sha256": "54edb2f104952d25b026fbc4fe46eaefbf3e04968c68c5b662f7ed98246f19e4" }, "downloads": -1, "filename": "humanreadable-0.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "1957759e64b13624552b54eb930c2d6d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 8252, "upload_time": "2019-03-16T11:26:07", "url": "https://files.pythonhosted.org/packages/03/fa/670ac9906e2e3f52423a9b43d24fdf6e6ca8535b2895822231d55d5e9ad4/humanreadable-0.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8cd6f13977f53daa82fcf67e263a9b93", "sha256": "29b281c4640ce1225095d5ef7abc7644feb96bf143446f9ee6310f779007a168" }, "downloads": -1, "filename": "humanreadable-0.0.2.tar.gz", "has_sig": false, "md5_digest": "8cd6f13977f53daa82fcf67e263a9b93", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 8663, "upload_time": "2019-03-16T11:26:09", "url": "https://files.pythonhosted.org/packages/f8/fc/7e2eb7773a3963b908d02b4ffe5ea0c96c71e251a20c02eefbb0b648039f/humanreadable-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "2599cd8f01f64f2873cf019cf4916423", "sha256": "83296c78870b1fd40c6b070a3a664ef27e4c68079c491c0d1473c643daca5393" }, "downloads": -1, "filename": "humanreadable-0.0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2599cd8f01f64f2873cf019cf4916423", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 8607, "upload_time": "2019-03-16T15:09:23", "url": "https://files.pythonhosted.org/packages/10/36/2d2a0810c707746ecce0904714bc8d5692fb39c43acc59db1d7c2c69d2d8/humanreadable-0.0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5f6fef2e712391f170602b08fd4472ea", "sha256": "22fb803c1bfb69335f642fa589bdbe4a58b2168b45ea063a24589ec4dd300f68" }, "downloads": -1, "filename": "humanreadable-0.0.3.tar.gz", "has_sig": false, "md5_digest": "5f6fef2e712391f170602b08fd4472ea", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 9986, "upload_time": "2019-03-16T15:09:25", "url": "https://files.pythonhosted.org/packages/4b/0a/78ac1292df89229f85abea89533139ee615a2954f1d79406b41663e97560/humanreadable-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "17346624fc99c2e68c2b26b705457314", "sha256": "c0c85b8648bc503b40e76f542e260c6da96c8109a2f8894e2916af72e65c08b1" }, "downloads": -1, "filename": "humanreadable-0.0.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "17346624fc99c2e68c2b26b705457314", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 8809, "upload_time": "2019-03-18T16:47:14", "url": "https://files.pythonhosted.org/packages/b1/1d/ca859ec527c7823d46e972e331442e836addaa63c5b4c10eb7fb0104e70a/humanreadable-0.0.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8223dea0c490540532e2bc37e644ff1c", "sha256": "c13c254fa53f14935daf4312ed7d25c4fa38999589f51c6052c22fddcfc2c200" }, "downloads": -1, "filename": "humanreadable-0.0.4.tar.gz", "has_sig": false, "md5_digest": "8223dea0c490540532e2bc37e644ff1c", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 10533, "upload_time": "2019-03-18T16:47:18", "url": "https://files.pythonhosted.org/packages/3f/16/cb08c5ad1ad2dcbb816e075356fccd5eab7961f22147c45ccd5c509cd9ae/humanreadable-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "fb8c7884559f7e99e34d813443535ecf", "sha256": "dcc5a08822583a43cf945d01c97e58a6a875157e902222394fd7085b8592d6ea" }, "downloads": -1, "filename": "humanreadable-0.0.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "fb8c7884559f7e99e34d813443535ecf", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 8810, "upload_time": "2019-04-30T08:46:51", "url": "https://files.pythonhosted.org/packages/de/17/fffaf05ce5a00083a32972d901573f39759ff5f84bcab4ccd4bb50994374/humanreadable-0.0.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e43fead86e86d82a156585b83904303a", "sha256": "75f8f0c23b93656f2e4ddc59a288c81291f1f9fbcfc560e367f1f6b98a8bf434" }, "downloads": -1, "filename": "humanreadable-0.0.5.tar.gz", "has_sig": false, "md5_digest": "e43fead86e86d82a156585b83904303a", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 10537, "upload_time": "2019-04-30T08:46:56", "url": "https://files.pythonhosted.org/packages/7c/ee/fa58e4a0f7e0abe4591dfb2b6514f9ba5710b8bfaa646f20e43c25c61942/humanreadable-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "ad40bd19b2fbdd5b8097778233f11d3e", "sha256": "e95817625b38c649f176c7f74fb6cb3d67927dd378d85c01b4eba6cd4acb3c46" }, "downloads": -1, "filename": "humanreadable-0.0.6-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ad40bd19b2fbdd5b8097778233f11d3e", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*", "size": 8878, "upload_time": "2019-05-01T15:13:15", "url": "https://files.pythonhosted.org/packages/c7/c0/d7845681ef62dca75df871fdfe5c3fa25066d849214dcdab415b78ee82dc/humanreadable-0.0.6-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "20a60dec47d6305a96423d16a701cf4e", "sha256": "03f161de4bb51fbb37db79789cae62ee99cf1081181c90445829b11d4c0b0235" }, "downloads": -1, "filename": "humanreadable-0.0.6.tar.gz", "has_sig": false, "md5_digest": "20a60dec47d6305a96423d16a701cf4e", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*", "size": 10654, "upload_time": "2019-05-01T15:13:16", "url": "https://files.pythonhosted.org/packages/30/dc/45349236efcbb326b81bea4f65b85dfe231652dfd1181c31630a4274baa5/humanreadable-0.0.6.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "0fab2fd7d5f80fad6c7fa90a53239804", "sha256": "3e4fcae49da4a4a45d6972053b1dab8d207e8c08e1e9da4fd4136f96328d460f" }, "downloads": -1, "filename": "humanreadable-0.0.7-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0fab2fd7d5f80fad6c7fa90a53239804", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*", "size": 8877, "upload_time": "2019-05-11T13:50:12", "url": "https://files.pythonhosted.org/packages/6c/3f/51d353ba3a215905438b95bf599e2deac3732224fead29e7402c8315f4d2/humanreadable-0.0.7-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fa7c2eb8095fd0c2cb53ea2aad637d88", "sha256": "7e0fe3da38e1970e930cf3dc5dedcc03d88cef170fd567b365ffcea1f04588c8" }, "downloads": -1, "filename": "humanreadable-0.0.7.tar.gz", "has_sig": false, "md5_digest": "fa7c2eb8095fd0c2cb53ea2aad637d88", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*", "size": 10657, "upload_time": "2019-05-11T13:50:13", "url": "https://files.pythonhosted.org/packages/33/fb/a3c04b8393d2710c2d779a6b94baf71164a65e94df884704828ad3cb1a47/humanreadable-0.0.7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0fab2fd7d5f80fad6c7fa90a53239804", "sha256": "3e4fcae49da4a4a45d6972053b1dab8d207e8c08e1e9da4fd4136f96328d460f" }, "downloads": -1, "filename": "humanreadable-0.0.7-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0fab2fd7d5f80fad6c7fa90a53239804", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*", "size": 8877, "upload_time": "2019-05-11T13:50:12", "url": "https://files.pythonhosted.org/packages/6c/3f/51d353ba3a215905438b95bf599e2deac3732224fead29e7402c8315f4d2/humanreadable-0.0.7-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fa7c2eb8095fd0c2cb53ea2aad637d88", "sha256": "7e0fe3da38e1970e930cf3dc5dedcc03d88cef170fd567b365ffcea1f04588c8" }, "downloads": -1, "filename": "humanreadable-0.0.7.tar.gz", "has_sig": false, "md5_digest": "fa7c2eb8095fd0c2cb53ea2aad637d88", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*", "size": 10657, "upload_time": "2019-05-11T13:50:13", "url": "https://files.pythonhosted.org/packages/33/fb/a3c04b8393d2710c2d779a6b94baf71164a65e94df884704828ad3cb1a47/humanreadable-0.0.7.tar.gz" } ] }