Skip to main content

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 >

Release files for numtext 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for numtext 0.2.1
File Size Uploaded
numtext-0.2.1.tar.gz 11.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for numtext 0.2.1
File Interpreter ABI Platform
numtext-0.2.1-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 16.1 kB

Release files / numtext-0.2.1.tar.gz

Download URL numtext-0.2.1.tar.gz
Size 11.4 kB
Tags Source
SHA-256 checksum
How to use checksums
bc21a42b897d9f370d521a988be47de808cddae481ccd41e51d8c34ea703f264
BLAKE2b-256 checksum
How to use checksums
0ddb3178181793149a8beebee3cff0b497d73097e5990ce2e1a7028b27ff9036
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.6

Release files / numtext-0.2.1-py2.py3-none-any.whl

Download URL numtext-0.2.1-py2.py3-none-any.whl
Size 4.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
e4bcba420a0e96b5d17c42103f31151789965af1178d3ab8f4cf485ac88cd30c
BLAKE2b-256 checksum
How to use checksums
b50729579eeb1f175da2ae60b33e928aea24d1d5d651e667edcc31bbe1633e81
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.6

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page