This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Reason given by maintainers: Replaced by human-readable.
SUPERSEEDED BY: https://github.com/staticdev/human-readable.
Features
This lib contains various humanization methods such as transforming a time difference in a human-readable duration “três minutos atrás” (three minutes ago) or in a phrase.
Requirements
It works in Python 3.7 and 3.8.
Installation
You can install Humanizer Portugues via pip from PyPI:
$ pip install humanizer-portugues
Usage
Import the lib with:
import humanizer_portugues
Humanization filesizes:
humanizer_portugues.natural_size(1000000)
"1.0 MB"
humanizer_portugues.natural_size(1000000, binary=True)
"976.6 KiB"
humanizer_portugues.natural_size(1000000, gnu=True)
"976.6K"
Humanization of lists:
humanizer_portugues.natural_list(["Cláudio", "Maria"], ",")
"Cláudio, Maria"
humanizer_portugues.natural_list(["Cláudio", "Maria"], ",", "e")
"Cláudio e Maria"
humanizer_portugues.natural_list(["Cláudio", "Maria", "José"], ";", "ou")
"Cláudio; Maria ou José"
Humanization of integers:
humanizer_portugues.ap_number(4)
"quatro"
humanizer_portugues.ap_number(41)
"41"
humanizer_portugues.int_comma(12345)
"12,345"
humanizer_portugues.int_word(123455913)
"123.5 milhão"
humanizer_portugues.int_word(12345591313)
"12.3 bilhão"
Humanization of floating point numbers:
humanizer_portugues.fractional(1/3)
"1/3"
humanizer_portugues.fractional(1.5)
"1 1/2"
humanizer_portugues.fractional(0.3)
"3/10"
humanizer_portugues.fractional(0.333)
"333/1000"
humanizer_portugues.fractional(1)
"1"
Humanization of dates and time:
import datetime
humanizer_portugues.natural_clock(datetime.time(0, 30, 0))
"zero hora e trinta minutos"
humanizer_portugues.natural_clock(datetime.time(0, 30, 0), formal=False)
"meia noite e meia"
humanizer_portugues.natural_date(datetime.date(2007, 6, 5))
"5 de junho de 2007"
humanizer_portugues.natural_day(datetime.datetime.now())
"hoje"
humanizer_portugues.natural_day(datetime.datetime.now() - datetime.timedelta(days=1))
"ontem"
humanizer_portugues.natural_day(datetime.date(2007, 6, 5))
"5 de junho"
humanizer_portugues.natural_delta(datetime.timedelta(seconds=1001))
"16 minutos"
humanizer_portugues.natural_period(datetime.time(5, 30, 0).hour)
"manhã"
humanizer_portugues.natural_time(datetime.datetime.now() - datetime.timedelta(seconds=1))
"há um segundo"
humanizer_portugues.natural_time(datetime.datetime.now() - datetime.timedelta(seconds=3600))
"há uma hora"
Contributing
Contributions are very welcome. To learn more, see the Contributor Guide.
License
Distributed under the terms of the MIT license, Humanizer Portugues is free and open source software.
Credits
This lib is based on original humanize, with updates for python3, translation fixes for portuguese, changes in return format and the addition of list humanizing. Localization (i18n) was also removed.
Metadata
Release files for humanizer-portugues 2.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| humanizer-portugues-2.4.1.tar.gz | 11.2 kB | Without provenance | Details for humanizer-portugues-2.4.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| humanizer_portugues-2.4.1-py3-none-any.whl | Python 3 | none | any | Details for humanizer_portugues-2.4.1-py3-none-any.whl |
Total release size: 21.8 kB
Release files / humanizer-portugues-2.4.1.tar.gz
| Download URL | humanizer-portugues-2.4.1.tar.gz |
|---|---|
| Size | 11.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3f1dc949a7e25d67d26bdc8e2544beaf132981c46e1afd98569addb5ffaabeab
|
|
BLAKE2b-256 checksum How to use checksums |
8bb439ff309793cb128300881d1baf2f64b5158680685d0a5a7f6c4b71cd3965
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.1
|
Release files / humanizer_portugues-2.4.1-py3-none-any.whl
| Download URL | humanizer_portugues-2.4.1-py3-none-any.whl |
|---|---|
| Size | 10.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
37a7038ac5dcc801c5d077dfa77ec2af09223abeb8fc4495a429cff689e604dd
|
|
BLAKE2b-256 checksum How to use checksums |
039e9d987f2ff85d8ee9a77fc80e18b6d707cda068dff31a1602b11a59c917e5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.1
|
Security for humanizer-portugues 2.4.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.