Skip to main content

Convert numbers to Azerbaijani words

Project description

aznum2words

Convert integers and decimal numbers to Azerbaijani words.

License: MIT Language: Azerbaijani

Installation

pip install aznum2words

Usage

from decimal import Decimal

from aznum2words import AzerbaijaniNumberConverter, convert, num2words

converter = AzerbaijaniNumberConverter()

converter.convert(123456789)
# "yüz iyirmi üç milyon dörd yüz əlli altı min yeddi yüz səksən doqquz"

convert("1,25")
# "bir tam yüzdə iyirmi beş"

num2words(Decimal("0.001"))
# "sıfır tam mində bir"

Strings may use . or , as the decimal separator. Decimal inputs keep their written fractional precision, so Decimal("1.20") is read as hundredths.

Development

python -m pip install -e ".[dev]"
python -m pytest

The package has no runtime dependencies and supports Python 3.9+.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aznum2words-1.0.0.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aznum2words-1.0.0-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file aznum2words-1.0.0.tar.gz.

File metadata

  • Download URL: aznum2words-1.0.0.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for aznum2words-1.0.0.tar.gz
Algorithm Hash digest
SHA256 4a67bece0d74ca744718e0d5445e5e1692d14fb68e10f5d709f12d72751b7f65
MD5 1585ae72337a22a89c287c1973c32434
BLAKE2b-256 7edaac9ad785cb594ac8f29de1f8173ed7cb1f18e6d620a2ad7bc2372e200282

See more details on using hashes here.

File details

Details for the file aznum2words-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: aznum2words-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for aznum2words-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f86d8b5f48196cfe91ba863cd2e82d7b0a2cb11564416cbd67fbf58ca18c5900
MD5 0011dbfc2e729fb5dd284b742888ddc7
BLAKE2b-256 3ce598e0bc639b0640d9d96f011fb5ceb2b99198bfddb56b5611ed5c1c8d66bc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page