Skip to main content

aznum2words - Azerbaijani Number to Words Converter for Python

aznum2words is a lightweight Python library for converting numbers to Azerbaijani words. It works as an Azerbaijani num2words style converter for integers, decimals, negative numbers, and numeric strings that use either . or , as the decimal separator.

PyPI version Python versions License: MIT Typed Language: Azerbaijani

Features

  • Convert integers to Azerbaijani text: 123 -> yüz iyirmi üç
  • Convert decimal numbers with Azerbaijani fraction wording
  • Handle negative numbers with mənfi
  • Accept int, float, str, and Decimal
  • Support both . and , decimal separators in strings
  • Keep Decimal fractional precision for amount-style text
  • Zero runtime dependencies
  • Typed package marker included for type checkers

Installation

pip install aznum2words

Quick Start

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"

Examples

from aznum2words import convert

convert(0)
# "sıfır"

convert(-42)
# "mənfi qırx iki"

convert("1001")
# "min bir"

convert("2.7021")
# "iki tam on mində yeddi min iyirmi bir"

Use Cases

aznum2words is useful for Azerbaijani localization, invoices, receipts, financial documents, legal documents, reports, form generation, and applications that need to display numbers as Azerbaijani text.

Common search terms for this package include Azerbaijani number to words, number-to-words Azerbaijani, Azeri num2words, Azerbaijani number converter, Python numbers to words, and Azerbaijani amount in words.

API

The package exposes three public imports:

from aznum2words import AzerbaijaniNumberConverter, convert, num2words

convert(number) and num2words(number) use a shared default converter. Instantiate AzerbaijaniNumberConverter when you prefer an explicit converter object.

Development

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

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

Metadata

Release files for aznum2words 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aznum2words 1.0.1
File Size Uploaded
aznum2words-1.0.1.tar.gz 6.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aznum2words 1.0.1
File Interpreter ABI Platform
aznum2words-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 12.6 kB

Release files / aznum2words-1.0.1.tar.gz

Download URL aznum2words-1.0.1.tar.gz
Size 6.5 kB
Tags Source
SHA-256 checksum
How to use checksums
4529267d5464648ca2118b39568886d83c33d1d40685609b079e71d76d0218ee
BLAKE2b-256 checksum
How to use checksums
e0423b9b204a52865583f52062dba86ef5ea94ff4072cedb28dc79eb78a11257
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release files / aznum2words-1.0.1-py3-none-any.whl

Download URL aznum2words-1.0.1-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cb11a9a0a05e4fdd947520ef1555c3c52f20c31fd44a7cdd71b956efb7f9dc4d
BLAKE2b-256 checksum
How to use checksums
651f66541cb54e3c475a355b989b818f2127d8a1db85af94ba993980dd496c4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page