Skip to main content

A Python package to convert numbers to Nepali words

Project description

Nepali Number to Word Converter

A Python package that converts numbers to Nepali words and numerals.

Features

  • Convert numbers to Nepali words (up to 99 खर्ब)
  • Handle float values
  • Convert numbers to Nepali numerals with proper formatting (१,२३,४५६ /-)
  • Support for positive and negative numbers
  • Proper error handling for unsupported numbers

Installation

Install the package:

pip install nepali_number_to_word

Usage

from nepali_number_to_word import convert_to_nepali_words, convert_to_nepali_numerals


result = convert_to_nepali_words(123456789)
print(result)  # Output: बाह्र करोड चौतिस लाख छपन्न हजार सात सय उनान्नब्बे रूपैयाँ मात्र

result = convert_to_nepali_numerals(123456789)
print(result)  # Output: १२,३४,५६,७८९ /-

# Examples
print(convert_to_nepali_words(1234567.999))      # बाह्र लाख चौतिस हजार पाँच सय अठसट्ठी रुपैंया
print(convert_to_nepali_numerals(1234567.999))   # १२,३४,५६८ /-

# Examples
print(convert_to_nepali_words(123))      # एक सय तेइस रूपैयाँ मात्र
print(convert_to_nepali_numerals(123))   # १२३ /-



# Error handling
try:
    convert_to_nepali_words(1000000000000000)  # Raises ValueError
except ValueError as e:
    print(e)  # Numbers beyond 999,999,999,999,999 (99 खर्ब) are not supported

Number Units

The converter supports the following Nepali number units:

  • खर्ब (Kharab) = 100,000,000,000
  • अरब (Arab) = 1,000,000,000
  • करोड (Crore) = 10,000,000
  • लाख (Lakh) = 100,000
  • हजार (Thousand) = 1,000

License

MIT License

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

nepali_number_to_word-0.1.3.tar.gz (18.3 kB view details)

Uploaded Source

Built Distribution

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

nepali_number_to_word-0.1.3-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file nepali_number_to_word-0.1.3.tar.gz.

File metadata

  • Download URL: nepali_number_to_word-0.1.3.tar.gz
  • Upload date:
  • Size: 18.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for nepali_number_to_word-0.1.3.tar.gz
Algorithm Hash digest
SHA256 8e7e08ff45a3cbf1d41ed41671677647e91ca6abff7608b99380de2f5c6413da
MD5 be4d092b123efdc717dedd8cf82eb21e
BLAKE2b-256 c1f8e858ec08bcf68efc7627dc073360317673d204281619594bb91cf80ceb40

See more details on using hashes here.

File details

Details for the file nepali_number_to_word-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for nepali_number_to_word-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4b1d52e9d3fa63a16c82fe5c3d6b4dc860d137d43a32ac80999ed9271d166463
MD5 a5290c8827c78bffce3eb66cbd604169
BLAKE2b-256 c3357947d91c4a5169eb0c882b75beee2efb581488381b68f6f17665bf78351d

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