{ "info": { "author": "", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "# humanizer-portugues\n\n![Travis](https://api.travis-ci.org/staticdev/humanizer-portugues.svg?branch=master)\n![Codecov](https://codecov.io/github/staticdev/humanizer-portugues/badge.svg?branch=master&service=github)\n![PyPi](https://badge.fury.io/py/humanizer-portugues.svg)\n\nEste pacote cont\u00e9m v\u00e1rias fun\u00e7\u00f5es de humaniza\u00e7\u00e3o (humanization), como\ntransformar um n\u00famero em uma dura\u00e7\u00e3o leg\u00edvel para humanos ('tr\u00eas minutos\natr\u00e1s') ou em uma frase. Ele funciona em python3, sendo recomendado\no uso da vers\u00e3o mais recente.\n\nEste c\u00f3digo \u00e9 baseado no pacote original\n[humanize](https://github.com/jmoiron/humanize), com atualiza\u00e7\u00e3o para\npython3, corre\u00e7\u00f5es de tradu\u00e7\u00e3o, formato e adi\u00e7\u00e3o de humaniza\u00e7\u00e3o de\nlistas. Al\u00e9m disso, foi retirado o recurso de localiza\u00e7\u00e3o (i18n)\nfacilitando sua utiliza\u00e7\u00e3o para portugu\u00eas.\n\n## Instala\u00e7\u00e3o\n\nPara instalar o `humanizer-portugues` execute o comando:\n\n```sh\npip install humanizer-portugues\n```\n\n## Uso\n\nPara importar o pacote basta executar:\n\n```python\nimport humanizer_portugues\n```\n\nHumanization de inteiros:\n\n```python\nhumanizer_portugues.intcomma(12345)\n'12,345'\n\nhumanizer_portugues.intword(123455913)\n'123.5 milh\u00e3o'\n\nhumanizer_portugues.intword(12345591313)\n'12.3 bilh\u00e3o'\n\nhumanizer_portugues.apnumber(4)\n'quatro'\n\nhumanizer_portugues.apnumber(41)\n'41'\n```\n\nHumanization datas e horas:\n\n```python\nimport datetime\nhumanizer_portugues.naturalclock(datetime.time(0, 30, 0))\n'zero hora e trinta minutos'\n\nhumanizer_portugues.naturalclock(datetime.time(0, 30, 0), formal=False)\n'meia noite e meia'\n\nhumanizer_portugues.naturalday(datetime.datetime.now())\n'hoje'\n\nhumanizer_portugues.naturaldelta(datetime.timedelta(seconds=1001))\n'16 minutos'\n\nhumanizer_portugues.naturalday(datetime.datetime.now() - datetime.timedelta(days=1))\n'ontem'\n\nhumanizer_portugues.naturalday(datetime.date(2007, 6, 5))\n'5 de junho'\n\nhumanizer_portugues.naturaldate(datetime.date(2007, 6, 5))\n'5 de junho de 2007'\n\nhumanizer_portugues.naturaltime(datetime.datetime.now() - datetime.timedelta(seconds=1))\n'h\u00e1 um segundo'\n\nhumanizer_portugues.naturaltime(datetime.datetime.now() - datetime.timedelta(seconds=3600))\n'h\u00e1 uma hora'\n```\n\nHumanization de tamanho de arquivos:\n\n```python\nhumanizer_portugues.naturalsize(1000000)\n'1.0 MB'\n\nhumanizer_portugues.naturalsize(1000000, binary=True)\n'976.6 KiB'\n\nhumanizer_portugues.naturalsize(1000000, gnu=True)\n'976.6K'\n```\n\nHumanization de n\u00fameros de ponto flutuante:\n\n```python\nhumanizer_portugues.fractional(1/3)\n'1/3'\n\nhumanizer_portugues.fractional(1.5)\n'1 1/2'\n\nhumanizer_portugues.fractional(0.3)\n'3/10'\n\nhumanizer_portugues.fractional(0.333)\n'333/1000'\n\nhumanizer_portugues.fractional(1)\n'1'\n```\n\nHumanization de listas:\n\n```python\nhumanizer_portugues.naturallist(['Cl\u00e1udio', 'Maria'], ',')\n'Cl\u00e1udio, Maria'\n\nhumanizer_portugues.naturallist(['Cl\u00e1udio', 'Maria'], ',', 'e')\n'Cl\u00e1udio e Maria'\n\nhumanizer_portugues.naturallist(['Cl\u00e1udio', 'Maria', 'Jos\u00e9'], ';', 'ou')\n'Cl\u00e1udio; Maria ou Jos\u00e9'\n```\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/staticdev/humanizer-portugues", "keywords": "humanize portugues data hora tamanho", "license": "MIT", "maintainer": "Thiago Carvalho D Avila", "maintainer_email": "thiagocavila@gmail.com", "name": "humanizer-portugues", "package_url": "https://pypi.org/project/humanizer-portugues/", "platform": "", "project_url": "https://pypi.org/project/humanizer-portugues/", "project_urls": { "Homepage": "https://github.com/staticdev/humanizer-portugues" }, "release_url": "https://pypi.org/project/humanizer-portugues/1.2.2/", "requires_dist": null, "requires_python": "", "summary": "Fun\u00e7\u00f5es para humaniza\u00e7\u00e3o (humanize) para python", "version": "1.2.2" }, "last_serial": 5733943, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "b7c232900b17294bad01d918193945ec", "sha256": "18085c42fe34ff47b233b7d8b3aaa34079f61199b4371c329c0ccec023557a52" }, "downloads": -1, "filename": "humanizer-portugues-0.0.1.tar.gz", "has_sig": false, "md5_digest": "b7c232900b17294bad01d918193945ec", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9793, "upload_time": "2018-03-18T19:34:03", "url": "https://files.pythonhosted.org/packages/37/16/9d75cdb45cb45bd7e187979c4a46d2b46028f7d889397a9e50c133d0bcbb/humanizer-portugues-0.0.1.tar.gz" } ], "0.1": [ { "comment_text": "", "digests": { "md5": "30b31ad43438d474d61965134bcc2ed4", "sha256": "8cd5fa4c8ee323f42d0267584dc314afcc00b47d1aa35b38f9fa0b6162a495d8" }, "downloads": -1, "filename": "humanizer-portugues-0.1.tar.gz", "has_sig": false, "md5_digest": "30b31ad43438d474d61965134bcc2ed4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9907, "upload_time": "2018-03-19T22:24:07", "url": "https://files.pythonhosted.org/packages/77/f8/2178dec89bcb72462a7ba426a77955d85b3ad7ea6f6c5dcb461bb79322cb/humanizer-portugues-0.1.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "a21029667558279ce77ba906636f1186", "sha256": "3cec22ef51302f9f1295f099e3eaefed1a2e6688c220f02055ecbed7b2652a99" }, "downloads": -1, "filename": "humanizer_portugues-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "a21029667558279ce77ba906636f1186", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 15062, "upload_time": "2018-03-20T23:21:10", "url": "https://files.pythonhosted.org/packages/5a/b4/129bbc2ea604198c6359e7123d13251d058f90e4363e2900059021e93a6f/humanizer_portugues-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "83da58c1b40fb9438df2bde013fa7650", "sha256": "2f9205d4c098fbb4f359a4918e5ef3350765a4463dbd69c3be37ce68870b7a13" }, "downloads": -1, "filename": "humanizer-portugues-1.0.0.tar.gz", "has_sig": false, "md5_digest": "83da58c1b40fb9438df2bde013fa7650", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10027, "upload_time": "2018-03-20T23:21:12", "url": "https://files.pythonhosted.org/packages/80/c2/738d7b271130a429a68b8ee65af355bccaadee3f1e281c5e1e9b22e23216/humanizer-portugues-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "775167c9924a902390fcc3bb41ba398b", "sha256": "57965b8011953f014cfea0b11ea32ba8d838cf161bb45435ce856e28171aea61" }, "downloads": -1, "filename": "humanizer_portugues-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "775167c9924a902390fcc3bb41ba398b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 15080, "upload_time": "2018-07-04T22:25:49", "url": "https://files.pythonhosted.org/packages/c6/b7/9d31b124f4fae7baa9c94dd40a08da6eaa9e4dc7480a7b447685a8e322e9/humanizer_portugues-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "61acdf4aa03a99328fdcb851f58a241b", "sha256": "ce9908d0ea30a074b94064b6dd025f73d746a49adbcdbad741efd3c51135d2d2" }, "downloads": -1, "filename": "humanizer-portugues-1.0.1.tar.gz", "has_sig": false, "md5_digest": "61acdf4aa03a99328fdcb851f58a241b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10110, "upload_time": "2018-07-04T22:25:50", "url": "https://files.pythonhosted.org/packages/28/74/709cf648cfaa60a07a44d5fa96edbc7f5f09449cb6874d63a46f93c5fdb0/humanizer-portugues-1.0.1.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "a36d4ed95e04889bfd5eeb3b00087212", "sha256": "3458c01e1fc1e254401d618c360a68a5a7240f760a39a6658b141c83b603852a" }, "downloads": -1, "filename": "humanizer_portugues-1.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "a36d4ed95e04889bfd5eeb3b00087212", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 16208, "upload_time": "2018-07-07T07:44:38", "url": "https://files.pythonhosted.org/packages/a0/e4/dc791268b387562613c8abeda99f789783148431a71999d340f65804d22d/humanizer_portugues-1.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d7cc70382eddb8155e61d4b38db39c01", "sha256": "794aab18e42284d0b872b40acf96bff2637654d778054c4d7cfd9cbc3fe922ac" }, "downloads": -1, "filename": "humanizer-portugues-1.1.0.tar.gz", "has_sig": false, "md5_digest": "d7cc70382eddb8155e61d4b38db39c01", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11250, "upload_time": "2018-07-07T07:44:40", "url": "https://files.pythonhosted.org/packages/7b/35/58c75e0480276632ff420f21b9d38a8a4882856c1fc3227dccb3c127a87b/humanizer-portugues-1.1.0.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "c3b63173dc72e664bd1a1ca3d24ac7d4", "sha256": "5be2eff01c686c206143a937baf9c796242a7c294cfa47c86b29f2f35d746a60" }, "downloads": -1, "filename": "humanizer_portugues-1.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "c3b63173dc72e664bd1a1ca3d24ac7d4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 16207, "upload_time": "2018-07-07T07:57:30", "url": "https://files.pythonhosted.org/packages/6e/fb/5d3a630ffa7a835d20a805373a76f3ac5a33b25d83386bf957fdbdcb904c/humanizer_portugues-1.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d73de2c6ab3f7a14c614af543b447cb0", "sha256": "86c78ec38d7581f770047c08fe5db2328fb335d3206a67f52f5c66cf9ee4e970" }, "downloads": -1, "filename": "humanizer-portugues-1.1.1.tar.gz", "has_sig": false, "md5_digest": "d73de2c6ab3f7a14c614af543b447cb0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11241, "upload_time": "2018-07-07T07:57:32", "url": "https://files.pythonhosted.org/packages/89/23/ffbf994c70696cc4e24950b3633beb7f5fdb5412e6a7ec3d2691d629410c/humanizer-portugues-1.1.1.tar.gz" } ], "1.1.2": [ { "comment_text": "", "digests": { "md5": "c80c6de261fa58a0866a8814c49326bf", "sha256": "d0b009c8cc64b07ee27f1af7fbc275ee55050042214fe81a518a674dfc7402b6" }, "downloads": -1, "filename": "humanizer_portugues-1.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "c80c6de261fa58a0866a8814c49326bf", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 16223, "upload_time": "2018-07-07T19:35:00", "url": "https://files.pythonhosted.org/packages/2d/cb/9b8cefcbd4a713cea672811794118231d81cd05d7851dba71bb0f77843e7/humanizer_portugues-1.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0e81ed1b73c995dfee8d724b8be91c3e", "sha256": "71ebd69313fe148291ccc53d433268789e347bc7dadda314a3f33c108ea7a154" }, "downloads": -1, "filename": "humanizer-portugues-1.1.2.tar.gz", "has_sig": false, "md5_digest": "0e81ed1b73c995dfee8d724b8be91c3e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11264, "upload_time": "2018-07-07T19:35:03", "url": "https://files.pythonhosted.org/packages/3d/26/d7dd7539b33716d104541eaa8dd2c29303d8d8d7d8aa0414069199f7eecf/humanizer-portugues-1.1.2.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "620c1e02f2790e4501a221e2aa7aaea5", "sha256": "7d88860d22b62a2f0ed94833d7ce7d7866ac20af07247afed4515692e0a3798e" }, "downloads": -1, "filename": "humanizer_portugues-1.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "620c1e02f2790e4501a221e2aa7aaea5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 15307, "upload_time": "2018-12-29T15:58:46", "url": "https://files.pythonhosted.org/packages/5f/52/31ef8d1b1c1d31d2e2b45a9966d9fb1cf7772f1bb1527bf2121734f8497b/humanizer_portugues-1.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7ece0a22647066ec1b0a8772fcfeaa5d", "sha256": "a4444475eee8cf6d27099e38aebbce0a74784a71d89f5c0fefb5127e28fe6d64" }, "downloads": -1, "filename": "humanizer-portugues-1.2.0.tar.gz", "has_sig": false, "md5_digest": "7ece0a22647066ec1b0a8772fcfeaa5d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11249, "upload_time": "2018-12-29T15:58:48", "url": "https://files.pythonhosted.org/packages/8c/95/b6c0ffa1e350ed97ad8544fcc1fb3b8a1de568960f0bf01ab6dd25d5348a/humanizer-portugues-1.2.0.tar.gz" } ], "1.2.1": [ { "comment_text": "", "digests": { "md5": "5ef00a4aa65817b39c3ce72647dbc2ab", "sha256": "8a1baba8f3c308be4341895d26a14031936a3070f0150f3fe8dccb1c4b6af598" }, "downloads": -1, "filename": "humanizer_portugues-1.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "5ef00a4aa65817b39c3ce72647dbc2ab", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 15716, "upload_time": "2019-01-11T07:29:10", "url": "https://files.pythonhosted.org/packages/9f/db/698509b3249c87e32d72fa35f058dad980231fd0e29f7aca8069a79a53dd/humanizer_portugues-1.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1944383853d9827554708b8df6c0d535", "sha256": "53526a1ca3cabee344e88c2d99a29be33725b59e2ba2463791befaa44b306894" }, "downloads": -1, "filename": "humanizer-portugues-1.2.1.tar.gz", "has_sig": false, "md5_digest": "1944383853d9827554708b8df6c0d535", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11565, "upload_time": "2019-01-11T07:29:11", "url": "https://files.pythonhosted.org/packages/e6/7f/82f4fcecc64a6b7be1e91e1735cc779664cd283136bfaf772c24e96c9603/humanizer-portugues-1.2.1.tar.gz" } ], "1.2.2": [ { "comment_text": "", "digests": { "md5": "a3634cfd3376284d260332d7fa4a7eaf", "sha256": "a494a8bad53bbf181586fd17292dabef2cb2093008c11f0b5fbbc7952fb9e3d2" }, "downloads": -1, "filename": "humanizer_portugues-1.2.2-py3-none-any.whl", "has_sig": false, "md5_digest": "a3634cfd3376284d260332d7fa4a7eaf", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 14840, "upload_time": "2019-08-27T01:28:28", "url": "https://files.pythonhosted.org/packages/f8/3e/0a9aa2a3139c45815bb49df95359d5c9d1761046cc2d66ea8d1616a40a43/humanizer_portugues-1.2.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "95791a0558bd7d036b25e359a4848841", "sha256": "e9b85df7983917e83f5d722409af33f2dc91b6f739f1147f23094771c9e7e470" }, "downloads": -1, "filename": "humanizer-portugues-1.2.2.tar.gz", "has_sig": false, "md5_digest": "95791a0558bd7d036b25e359a4848841", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11233, "upload_time": "2019-08-27T01:28:32", "url": "https://files.pythonhosted.org/packages/3b/4d/7ddd83943d967e97a09abb4ed08325209a11c166c8150b67b762f3504f55/humanizer-portugues-1.2.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a3634cfd3376284d260332d7fa4a7eaf", "sha256": "a494a8bad53bbf181586fd17292dabef2cb2093008c11f0b5fbbc7952fb9e3d2" }, "downloads": -1, "filename": "humanizer_portugues-1.2.2-py3-none-any.whl", "has_sig": false, "md5_digest": "a3634cfd3376284d260332d7fa4a7eaf", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 14840, "upload_time": "2019-08-27T01:28:28", "url": "https://files.pythonhosted.org/packages/f8/3e/0a9aa2a3139c45815bb49df95359d5c9d1761046cc2d66ea8d1616a40a43/humanizer_portugues-1.2.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "95791a0558bd7d036b25e359a4848841", "sha256": "e9b85df7983917e83f5d722409af33f2dc91b6f739f1147f23094771c9e7e470" }, "downloads": -1, "filename": "humanizer-portugues-1.2.2.tar.gz", "has_sig": false, "md5_digest": "95791a0558bd7d036b25e359a4848841", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11233, "upload_time": "2019-08-27T01:28:32", "url": "https://files.pythonhosted.org/packages/3b/4d/7ddd83943d967e97a09abb4ed08325209a11c166c8150b67b762f3504f55/humanizer-portugues-1.2.2.tar.gz" } ] }