Skip to main content

This module provides functions for getting the English names of numbers.

Project description

Number Names

number_names converts numbers to their English names.

The main useful function this package provides is called name. Usage is as follows:

>>> import number_names
>>> number_names.name(0)
'zero'
>>> number_names.name(1)
'one'
>>> number_names.name(2)
'two'
>>> number_names.name(123_456_789)
'one hundred and twenty three million four hundred and fifty six thousand seven hundred and eighty nine'
>>> number_names.name(3.1415)
'three point one four one five'
>>> number_names.name(-10 ** 15)
'minus one quadrillion'
>>> number_names.name(10 ** 100000)
'ten tretriginmilliatrecenduotrigintillion'
>>> number_names.name(3 + 2j)
'three plus two i'
>>> from fractions import Fraction
>>> number_names.name(Fraction(1, 2))
'one half'
>>> number_names.name(Fraction(3, 221))
'three two hundred and twenty firsts'

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

number_names-0.1.2.tar.gz (17.1 kB view details)

Uploaded Source

Built Distribution

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

number_names-0.1.2-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

Details for the file number_names-0.1.2.tar.gz.

File metadata

  • Download URL: number_names-0.1.2.tar.gz
  • Upload date:
  • Size: 17.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.32.3

File hashes

Hashes for number_names-0.1.2.tar.gz
Algorithm Hash digest
SHA256 776ecb51f0eea9bc05831cb0559b45a5772655ba4dd944c1c25d14d1d1ad198e
MD5 eeef1aaac6f87a9a2d2263188610ce7b
BLAKE2b-256 f481f863a2b49959ddc720551e19e80c81df5d6061f149ad17265db198fe6d7d

See more details on using hashes here.

File details

Details for the file number_names-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: number_names-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 15.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.32.3

File hashes

Hashes for number_names-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e13a5f1feb1512e07e36cd73156cb3040f663c87d580790dd709fb8a18b71f52
MD5 181ca7cd6973e9da077d9e594caa4c64
BLAKE2b-256 3ccf7bc94ce8d165f8d51bd67f70551ccbe9b6c23c3f89b7031ad3eba9ad3e22

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