Baht library for Python
Project description
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
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
pybaht-0.1.1.tar.gz
(4.0 kB
view details)
Built Distribution
File details
Details for the file pybaht-0.1.1.tar.gz
.
File metadata
- Download URL: pybaht-0.1.1.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f96dec74b99a63d06486d219418d4ac1281fb3f8822f9889572b1ad204e1601f |
|
MD5 | 6af7cc79e4c46e464373aebc29fbe3e2 |
|
BLAKE2b-256 | 525d2ed6e0eba3f4d486ae22ecb25eba4c4f4987fcd6dbf59585edc80053a222 |
File details
Details for the file pybaht-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: pybaht-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b829b82f38cb1a535d5e96341a0d21cb1f4c6918cc009626c920f7e1f360bf19 |
|
MD5 | 8b6f90ef1fdc938672c2ee26cb06f915 |
|
BLAKE2b-256 | 8dcc883e3284125208bd9155c8cb3f097a8423a0cb733c58ee31f70628f445d1 |