Skip to main content

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

num_word_converter-1.0.5.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

num_word_converter-1.0.5-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file num_word_converter-1.0.5.tar.gz.

File metadata

  • Download URL: num_word_converter-1.0.5.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for num_word_converter-1.0.5.tar.gz
Algorithm Hash digest
SHA256 ea9cbc680ae00ce62034ba7839ae3adca591132a6357b65a84400cd569c55273
MD5 20af9e11421fd69616192066276ac44d
BLAKE2b-256 377b6f9758502bec21d692b5780f0605eeab2611832b818b0ede7e95fa16643b

See more details on using hashes here.

File details

Details for the file num_word_converter-1.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for num_word_converter-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 5cce5d6a9660d65b585d7ac4b248bc0a5c550a60a401a879a5ff7236a292c447
MD5 d35fbb35cba610551ce3be113f67ea98
BLAKE2b-256 10a3a72ba9f7485c6bb6afd7892c1d2c062dd6197208f48514eb9350f61b2ef1

See more details on using hashes here.

Supported by

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