Skip to main content

Baht library for Python

Project description

pybaht

continuous-integration release PyPI version fury.io License: MIT codecov

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

Reference

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

pybaht-0.2.0.tar.gz (4.0 kB view hashes)

Uploaded Source

Built Distribution

pybaht-0.2.0-py3-none-any.whl (4.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page