Skip to main content

Python Package to convert number to text

Project description

Num Text

A Python Package to convert Numbers to Text.

PyPI PyPI - Python Version PyPI - Implementation PyPI - Wheel PyPI - Status PyPI - Downloads

Github Username GitHub commit activity GitHub release (latest by date including pre-releases) GitHub tag (latest by date) GitHub top language GitHub language count GitHub code size in bytes GitHub repo size

Installation :

pip install numtext

Details :

Convert any whole number to text.

Dependency :

This package is developed without any third party dependency. It uses re library which is built into python. Other features are implemented in pure python.

Examples :

Module Examples

import numtext as nt

a_big_number = 123456789
a_big_number_in_text = nt.convert(a_big_number)
print(a_big_number_in_text)
# nine hundred and eighty seven million six hundred and
# fifty four thousand three hundred and twenty one
import numtext as nt

tiny_number = "12"  # Number can also be in string
tiny_number_text = nt.convert(tiny_number)
print(tiny_number_text) # twelve

CLI Examples

$ numtext 123

One hundred and twenty three

$ numtext 987654321

nine hundred and eighty seven million six hundred and fifty four thousand three hundred and twenty one

$ numtext 56789 --capitalize

Fifty six thousand seven hundred and eighty nine

Roadmap :

This package is still in active development. More features will be added frequently.

Features Yet to be added :

  1. Support for numbers above Nine hundreden and Ninty Nine Duotrigintillion (999 x 10^99).
  2. Support for Negative Number.
  3. Conversion in Indian System.
  4. Support for Fractional numbers.
  5. Better Exceptional Handling.
  6. Text Formatting Options like lowercase, capitalize etc., for converted text.
  7. < I would like to hear your advice on what feature to add >

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

numtext-0.2.1.tar.gz (11.4 kB view hashes)

Uploaded Source

Built Distribution

numtext-0.2.1-py2.py3-none-any.whl (4.7 kB view hashes)

Uploaded Python 2 Python 3

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