A Python library for formatting numbers into the Lakh Crore (...हजार, लाख, करोड, अर्ब...) system.
Project description
Lakh Crore Numbers
A Python library for formatting numbers into the "Lakh Crore" (...हजार, लाख, करोड, अर्ब...) system.
This numbering system (also known as Indian numbering system) is widely used in the subcontinent, including Bangladesh, Bhutan, India, Maldives, Nepal, Pakistan and Sri Lanka to express large numbers. The terms lakh
and crore
are commonly used in everyday scenarios. The library currently supports formatting all the way up to sankha
.
Installation
lakh-crore-numbers is available on PyPI:
python -m pip install lakh-crore-numbers
Supported Language(s)
As of now, the library is written for the following languages. Support for more subcontinental languages across other programming languages will be added over time. Please feel free to open a PR for a language you want this library to support.
Programming Languages
- Python (3.6 and up)
Spoken Languages
- Nepali / नेपाली
Documentation
The current goal of the library is to be format numbers into two types of representation.
- Number expressed as numeral in the target language
- Number expressed as words in the target language
A handful of functions are available on the top level import to facilitate this.
Formatting to Numerals (Nepali / नेपाली)
import lakh_crore_numbers as lcn
assert lcn.format_to_nepali_numeral(783456) == '७८३४५६'
Formatting to Words (Nepali / नेपाली)
import lakh_crore_numbers as lcn
assert lcn.format_to_nepali_words(901489783456) == 'नौ खर्ब एक अर्ब अठचालीस करोड सन्तानब्बे लाख त्रियासी हजार चार सय छपन्न'
For more formatting examples, please take a look here.
Changelog
Please check the CHANGELOG.md for details.
License
Copyright © 2021, Suvash Thapaliya
Distributed under the ISC License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file lakh-crore-numbers-0.1.0.tar.gz
.
File metadata
- Download URL: lakh-crore-numbers-0.1.0.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 884c49f48bb022b072ce960b393be1ac1f2735371c0a0c37f56ddddea46bb0a5 |
|
MD5 | 52af8e8d6c1d5ce0d5755e58fbf93eb5 |
|
BLAKE2b-256 | e9edecdc81feaa4c9c5fc69feeb3ee7ba5d582e6c9026f4826f6cb24d4028c2f |
File details
Details for the file lakh_crore_numbers-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: lakh_crore_numbers-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f445a005d2decf6b4aa6c4568ce4091f270c76f106220a488c729c29078b8649 |
|
MD5 | b69e8f6ed150805c16751b79a1e2761b |
|
BLAKE2b-256 | 4f421492fa1eec199c3b036dbffdd44ed9f119b0fe75b0a8bc52ef77f6000309 |