Skip to main content

number-to-word is a Python library for converting numbers into their written English or Arabic word equivalents.

Project description

number-to-word

number-to-word is a Python library for converting numbers into their written English or Arabic word equivalents. This library is particularly useful for financial applications, where there is a need to convert numeric values into written text. It also supports currency names.

Features

  • Convert numbers to written words in English or Arabic.
  • Add currency names to the converted results.
  • Lightweight and easy to integrate.

Installation

You can install number-to-word using pip:

pip install number-to-word

Usage

Here's a simple example of how to use number-to-word:

from numbertoword import NumberToWord

# Convert a number to words in English
print(NumberToWord.to_word(123.5, 'SYP', "English"))  # Output: One Hundred Twenty Three Syrian Pounds and Fifty Piasters only.

# Convert a number to words in Arabic
print(NumberToWord.to_word(123.5, 'SYP', "Arabic"))  # Output: ظپظ‚ط· ظ…ط§ط¦ط© ظˆ ط«ظ„ط§ط«ط© ظˆ ط¹ط´ط±ظˆظ† ظ„ظٹط±ط© ط³ظˆط±ظٹط© ظˆ ط®ظ…ط³ظˆظ† ظ‚ط±ط´ط§ظ‹ ظ„ط§ ط؛ظٹط±.

Contributing

Contributions are welcome! If you'd like to contribute, please fork the repository and use a feature branch. Pull requests are warmly welcome.

Licensing

This project is licensed under MIT License.

Contact

For any queries or feedback, please reach out to Adel Khayata.

Acknowledgements

  • Thanks to all the contributors who have helped to shape number-to-word.

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

number-to-word-1.0.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

number_to_word-1.0-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file number-to-word-1.0.tar.gz.

File metadata

  • Download URL: number-to-word-1.0.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.1

File hashes

Hashes for number-to-word-1.0.tar.gz
Algorithm Hash digest
SHA256 7655c89ed82b68a97918cc14e15254af299a56efa25d3c426ca0590cd2eac0ef
MD5 4dce8ec43c7ee3df08a01ddcfe86e5a3
BLAKE2b-256 970f5d3727159db76204b2be34e982f3d0ce83d1e357084fe38192adec4c963c

See more details on using hashes here.

File details

Details for the file number_to_word-1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for number_to_word-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 45e2ac36f01d1926b15cbee6da0e319e76ceff0d4a17d5c174d0fd5be4c715b3
MD5 0822c8deb42d089425907f241bc867b3
BLAKE2b-256 542fc613c125d555070f0aa2698316ca80ee92173a1235d1dd2fa8b3678f3ef4

See more details on using hashes here.

Supported by

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