Skip to main content

cnum

cnum is a Python library for changing int and float value to Chinese numeral format string.

Chinese numeral format is adopted following languages:

  • Japanese
  • Simplified Chinese
  • Traditional Chinese
  • Korean

For each languages

Installation

Use the package manager pip to install foobar.

pip install cnum

Usage

import cnum

# returns Japanese styled numeral string.
cnum.jp(123456789.123456789)
'1億2345万6789 1分2厘3毛4糸5忽'

# returns simplified Chinese styled numeral string. 
cnum.scn(123456789.12345)
'1亿2345万6789 1分2厘3毫4丝5忽'

# returns traditional Chinese styled numeral string. 
cnum.tcn(123456789.12345)
'1億2345萬6789 1分2厘3毫4絲5忽'

# returns Korean styled numeral string. 
cnum.kr(123456789.12345)
'1억2345만6789 1分2厘3毛4糸5忽'

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

Release files for cnum 0.0.6

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

Source distribution (sdist)

Source distribution for cnum 0.0.6
File Size Uploaded
cnum-0.0.6.tar.gz 3.8 kB Details

Built distribution (wheel)

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

Total release size: 7.6 kB

Release files / cnum-0.0.6.tar.gz

Download URL cnum-0.0.6.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
fb433ba7c6c38ac37010111c3eebb63d74e405ba4c9c27fa718d4b047cb198d0
BLAKE2b-256 checksum
How to use checksums
12d9c39c9fada73ec607c2b9b869335e52068d29350572d3da990a76c0b4a450
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.7

Release files / cnum-0.0.6-py3-none-any.whl

Download URL cnum-0.0.6-py3-none-any.whl
Size 3.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
65aebc435b99c1f50e697b9769da77f060b4fe2f1059c3d98fdf2713f62e2a37
BLAKE2b-256 checksum
How to use checksums
723ef9e667b72f6374033f4b5846acf4982ae2b9b14466339c44f095aae3cec3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.7

Release history Release notifications | RSS feed

This release

0.0.6 This release

2 release files

0.0.5

2 release files

0.0.4

3 release files

0.0.3

1 release file

0.0.2

2 release files

0.0.1

2 release files

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