Biblioteca profissional para manipulação de Moeda Angolana (Kwanza)
Project description
ao_currency
Biblioteca profissional para manipulação de Moeda Angolana (Kwanza).
CLI Interface
A biblioteca inclui uma ferramenta de linha de comando:
# Formatação rápida
python3 -m ao_currency.cli "1500,50" --formatar
# Conversão para extenso
python3 -m ao_currency.cli "2500000" --extenso
# Conversão inversa (Extenso para Número)
python3 -m ao_currency.cli "Dois milhões de kwanzas" --numero
Instalação
pip install ao_currency
Instalação Local (Desenvolvimento)
Se você deseja contribuir ou testar localmente:
git clone https://github.com/cornelioteixeira/ao_currency.git
cd ao_currency
pip install -e .
Como usar
from ao_currency import AngolaMoeda
# Criar a partir de string suja
moeda = AngolaMoeda(" Kz 1.250,50 ")
# Formatação
print(moeda.formatar()) # 1.250,50 Kz
print(moeda.formatar(usar_iso=True)) # 1.250,50 AOA
# Extenso
print(moeda.por_extenso()) # Um mil duzentos e cinquenta kwanzas e cinquenta cêntimos
# Criar a partir de extenso
moeda_v2 = AngolaMoeda.de_extenso("Mil quinhentos kwanzas")
print(moeda_v2.valor) # 1500.00
Funcionalidades
- Sanitizador: Limpa qualquer entrada (Excel, formatado AGT, string bruta).
- Formatador: Segue o padrão bancário angolano.
- Motores Modularizados: Fácil de estender e manter.
- Tipagem Forte: Usa Pydantic e Decimal para precisão financeira.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ao_currency-0.1.0.tar.gz
(6.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ao_currency-0.1.0.tar.gz.
File metadata
- Download URL: ao_currency-0.1.0.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
050ea95c313349441dbe12bd849e74a8adff7c0a5ffac82e4455368bcb81dda1
|
|
| MD5 |
9e9e4ee04dccd5e13c0890f2d2ac4cb1
|
|
| BLAKE2b-256 |
eba012b1031a27d4864e4bdf7e3f217b5ff89f55e0218226a2aabb6fdcfe932e
|
File details
Details for the file ao_currency-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ao_currency-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
61397c2b990ef31e92135d41c0467a7f4eb6fcc8fdb2507f799225a457c1f22b
|
|
| MD5 |
7523d6d8b004735988d9f1e0f196b1aa
|
|
| BLAKE2b-256 |
6dd3c9d503b9e825d55c0cf3327208ee3703dd502581ef7ef6006de0d36b2383
|