Skip to main content

bdkit

Everyday utilities for Bangladeshi apps: write taka amounts in words for invoices and cheques (English or Bangla, lakh/crore), validate mobile numbers and detect the operator, and convert between Bangla and English digits.

No dependencies. Python 3.9+.

pip install bdkit

Taka in words

from bdkit import taka_in_words, number_to_words

taka_in_words(125050.50)
# 'One Lakh Twenty-Five Thousand Fifty Taka and Fifty Paisa Only'

taka_in_words("12,500", lang="bn")
# 'বারো হাজার পাঁচ শত টাকা মাত্র'

taka_in_words(1000, only=False)
# 'One Thousand Taka'

number_to_words(52_71_036, lang="bn")
# 'বায়ান্ন লক্ষ একাত্তর হাজার ছত্রিশ'

Amounts can be numbers, Decimals or strings with commas or ৳. Paisa are rounded half up to two decimal places.

Mobile numbers

from bdkit import parse_mobile, normalize_mobile, mobile_operator, is_valid_mobile

normalize_mobile("01712-345678")      # '+8801712345678'
mobile_operator("+880 1912 345678")   # 'Banglalink'
is_valid_mobile("০১৮১২৩৪৫৬৭৮")        # True (Bangla digits work)

m = parse_mobile("008801512345678")
m.local, m.e164, m.operator, m.formatted()
# ('01512345678', '+8801512345678', 'Teletalk', '01512-345678')

Accepted forms are 017…, +880 17…, +88 017…, 88017… and 0088017…, with or without spaces, dashes or brackets.

Prefix Operator
013, 017 Grameenphone
014, 019 Banglalink
016, 018 Robi
015 Teletalk

Digits and lakh formatting

from bdkit import to_bangla_digits, to_english_digits, format_lakh

to_bangla_digits("2026-11-15")         # '২০২৬-১১-১৫'
to_english_digits("৳১,২৫,০০০")         # '৳1,25,000'
format_lakh(12345678)                  # '1,23,45,678'
format_lakh(1234567.5, decimals=2)     # '12,34,567.50'
format_lakh(150000, bangla=True)       # '১,৫০,০০০'

Command line

$ bdkit words 125050.50
One Lakh Twenty-Five Thousand Fifty Taka and Fifty Paisa Only
$ bdkit words 12500 --bn
বারো হাজার পাঁচ শত টাকা মাত্র
$ bdkit phone "+880 1712-345678" 01812345678
+8801712345678  Grameenphone
+8801812345678  Robi
$ bdkit lakh 12345678
1,23,45,678
$ bdkit bn 2026
২০২৬

License

MIT

Metadata

Release files for bdkit 0.1.0

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

Source distribution (sdist)

Source distribution for bdkit 0.1.0
File Size Uploaded Provenance Actions
bdkit-0.1.0.tar.gz 8.4 kB Without provenance Details for bdkit-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bdkit 0.1.0
File Interpreter ABI Platform Actions
bdkit-0.1.0-py3-none-any.whl Python 3 none any Details for bdkit-0.1.0-py3-none-any.whl

Total release size: 18.2 kB

Release files / bdkit-0.1.0.tar.gz

Download URL bdkit-0.1.0.tar.gz
Size 8.4 kB
Tags Source
SHA-256 checksum
How to use checksums
485f4e94dd5749ea8d58aab7573ca06efa6b020a34ea3d25bca0c4cbc5722b27
BLAKE2b-256 checksum
How to use checksums
f552ce0bb4fba10aa5cb4100d83531cb1f962d3cb85e39db1982d6f30fbfd844
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / bdkit-0.1.0-py3-none-any.whl

Download URL bdkit-0.1.0-py3-none-any.whl
Size 9.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
df12913b39648978880cfceb69733f95ce4bf99a464e1ed7d799d0aa68509d6a
BLAKE2b-256 checksum
How to use checksums
6372a13479cf7c19d8b00e9a1ea7d71fa8f9569c67049fcd42bac82dc2b4b156
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for bdkit 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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