Catalog PyPI
PACKAGE EXPLORERView in registry

aaqnumtowords

PyPI

A Python package for converting numbers to text

Versions collected1
Direct dependencies0From release 0.0.4
Last observed20 Oct, 17:01 UTC

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.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.0.425 Feb 20250

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

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:7b227f2082ca59222e5336769e0bd9537ed433ae74fccec3f988006a36d36dda