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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file number-to-word-1.1.tar.gz
.
File metadata
- Download URL: number-to-word-1.1.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8288c7dd7566e23f44dfb6951492fcb5ff9fd10ea28119946bdc8613805b2bca |
|
MD5 | 7993addb9b66ba66b80f923bd65ae23e |
|
BLAKE2b-256 | 7c0a006b3f07ab45fa198b0c70f8bf066ab9854af20684e769d43943d85bc748 |
File details
Details for the file number_to_word-1.1-py3-none-any.whl
.
File metadata
- Download URL: number_to_word-1.1-py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2843be672e2f0f81e2dff117953a1cbecbf833a8e0a72b597d2b62515d7a902 |
|
MD5 | 07aeae087f39eec34fffc8f0b69258c4 |
|
BLAKE2b-256 | 571ceb1aa25d99b2baf0cd4afcdb00c4499e633860f0777d1d3b365327095716 |