A package to convert numbers to words and vice-versa
Project description
num-word-converter
num-word-converter is a Python package that provides functionality to convert numbers to words and words to numbers.
Features
- Convert integer and float numbers to English words
- Convert English words of numbers back to integer or float
- Error handling for non-numeric and complex inputs
Usage
from num_word_converter import num_to_word, word_to_num
print(num_to_word(123))
# one hundred and twenty-three
print(word_to_num("one hundred and twenty-three"))
# 123
Running the tests
Tests are run using tox, which also builds a coverage report.
If you haven't installed tox, install it using pip:
pip install tox
Then to run the tests, simply run tox from the project root:
tox
This will run the tests in each environment specified in tox.ini, and generate a coverage report. Note that tox handles setting up the virtual environments and installing dependencies, so it's not necessary to activate a virtual environment or install dependencies manually.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file num_word_converter-1.0.2.tar.gz.
File metadata
- Download URL: num_word_converter-1.0.2.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4da1eaf305334e3bbde3406c388c34c9cfc6e60d4ef7e8ea2fd95d20681e370f
|
|
| MD5 |
9825f16194705d60f1c78438dc99e2de
|
|
| BLAKE2b-256 |
91af51ac7dea25fa6fc38bd1b60151fb3836f3ed0eeaa7651a8e458086b31a2f
|
File details
Details for the file num_word_converter-1.0.2-py3-none-any.whl.
File metadata
- Download URL: num_word_converter-1.0.2-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a83f8c9eeb2af45e9a028a6306c50b1a9d9f0b888ff98e2e429d56e699b69828
|
|
| MD5 |
dae52ef2cd612f3fb649e056f7be5b29
|
|
| BLAKE2b-256 |
0b76e3a755cb83d4ea9ecf44f326727341bc6d0943f9ffd4c896fb235936ecab
|