pybaht
Baht library for Python
Installation
pip install pybaht
Usage
from pybaht import bahttext
bahttext(37) == "สามสิบเจ็ดบาทถ้วน"
bahttext(63147.89) == "หกหมื่นสามพันหนึ่งร้อยสี่สิบเจ็ดบาทแปดสิบเก้าสตางค์"
bahttext(-0.36) == "ลบสามสิบหกสตางค์"
Development
# Conda env
conda create --name pybaht python=3.10.4
conda activate pybaht
# test case file
curl -L -o ./tests/testcases.csv https://docs.google.com/spreadsheets/d/e/2PACX-1vTb8PIKzgo07rn9UpcjqE0YrdMAmf4fyDbL2plUieLCyrn_5O3vDvece7UfkaArWQLUSsaw92jVpY_z/pub?gid=0&single=true&output=csv
csvtojson ./tests/testcases.csv | jq > ./tests/testcases.json
Other languages
- JavaScript: jojoee/bahttext
Reference
Release files for pybaht 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pybaht-0.2.0.tar.gz | 4.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pybaht-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.7 kB
Release files / pybaht-0.2.0.tar.gz
| Download URL | pybaht-0.2.0.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c08b3265ca113f79a11c7e3f5eda91ba018c3f74a6e0faf16600484ce4da2df6
|
|
BLAKE2b-256 checksum How to use checksums |
29960a54bb98ca1a9c1d15a4a72c935ba9cfb1199f25ef2d27210002d38461ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.9.6 readme-renderer/37.3 requests/2.30.0 requests-toolbelt/1.0.0 urllib3/2.0.2 tqdm/4.65.0 importlib-metadata/6.6.0 keyring/23.13.1 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.11
|
Release files / pybaht-0.2.0-py3-none-any.whl
| Download URL | pybaht-0.2.0-py3-none-any.whl |
|---|---|
| Size | 4.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
810dbaaa2523f9ee0b580c9ee67dbdacac442b0596ae59572c1d40e4df094cbb
|
|
BLAKE2b-256 checksum How to use checksums |
336b639d5d37cbe25339d4b7ac6ebee7b1bacacecaa6f9e1f39f9df22234d448
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.9.6 readme-renderer/37.3 requests/2.30.0 requests-toolbelt/1.0.0 urllib3/2.0.2 tqdm/4.65.0 importlib-metadata/6.6.0 keyring/23.13.1 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.11
|