Catalog PyPI
Back to packageRELEASE DETAILS

0.0.4

PyPI

aaqnumtowords

A Python package for converting numbers to text

Published25 Feb 2025
Direct dependencies0
Transitive dependenciesNot calculated

README

Version 0.0.4 documentation

NumberToWords Library Example

This example demonstrates how to use the aaqnumtowords library to convert numbers to words in both Persian and English languages.

Installation

First, you need to install the aaqnumtowords library:

pip install aaqnumtowords

Usage

Here is an example of using the library to convert numbers to words in both Persian and English.

from aaqnumtowords import NumberToWords

try:
    # Convert number to words in Persian
    converter_fa = NumberToWords(language='fa')
    print(converter_fa.number_to_words(123456789123456789123456789))  # Sample number in Persian
    
    # Convert number to words in English
    converter_en = NumberToWords(language='en')
    print(converter_en.number_to_words(123456789123456789123456789))  # Sample number in English
except ValueError as e:
    print(f"Error: {e}")

Explanation:

  • This code converts a very large number to words in both Persian and English.
  • If the input number is too large or invalid, a ValueError occurs, and an error message is displayed.

Output:

صد و بیست و سه کوادریلیون چهارصد و پنجاه و شش تریلیون هفتصد و هشتاد و نه بیلیون یکصد و بیست و سه میلیون چهارصد و پنجاه و شش هزار هفتصد و هشتاد و نه one hundred twenty-three quadrillion four hundred fifty-six trillion seven hundred eighty-nine billion one hundred twenty-three million four hundred fifty-six thousand seven hundred eighty-nine


Notes:

  • This code allows you to convert numbers into a readable format in different languages.
  • You can change the language of conversion as needed.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 0

Native requirements
0 direct targetsNot calculated transitive count
No declared dependencies in this collected response

Declarations describe requirements; they are not a resolved dependency graph.

Distribution files

2 collected
aaqnumtowords-0.0.4-py3-none-any.whl

bdist_wheel · 4.69 KB · Python py3

Source file
aaqnumtowords-0.0.4.tar.gz

sdist · 3.83 KB · Python source

Source file

Repository

PENDING
mraaqpy/aaqnumtowords

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 17:01 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:ddd77c6cc76f60d3d643c2053fa9cfbb772b3c61644d5b475d6254f52936fb11

Other collected versions

View all collected versions →