Skip to main content

Easy converter between Kanji-Number and Integer

Powered by Yamato Nagata

GitHub

Can Convert Number up to 10 ** 72 - 1

from kanjize import number2kanji, kanji2number, Number, KanjizeConfiguration, KanjizeZero, KanjizeStyle

print(number2kanji(58076099))
    # 五千八百七万六千九十九

print(number2kanji(58076099, config=KanjizeConfiguration(use_daiji=True)))
    # 伍阡捌佰漆萬陸阡玖拾玖

print(kanji2number("五千八百七万六千九十九"))
    # 58076099

print(kanji2number("223兆4千億4256万6千"))
    # 223400042566000

print(kanji2number("223兆4000億4256万6000"))
    # 223400042566000

print(number2kanji(223400042566000, config=KanjizeConfiguration(style=KanjizeStyle.MIXED, kanji_thousand=False)))
    # 223兆4000億4256万6000

print(number2kanji(223400042566000, config=KanjizeConfiguration(style=KanjizeStyle.MIXED)))
    # 223兆4千億4256万6千

print(number2kanji(20301, config=KanjizeConfiguration(style=KanjizeStyle.FLAT)))
    # 二〇三〇一

print(number2kanji(20301, config=KanjizeConfiguration(style=KanjizeStyle.FLAT, zero=KanjizeZero.KANJI)))
    # 二零三零一

print(number2kanji(0))
    # 零

print(number2kanji(0, config=KanjizeConfiguration(zero=KanjizeZero.SIGN)))
    # 〇

print((Number.from_kanji("223兆4千億4256万6千") * Number(2.3)).to_kanji(config=KanjizeConfiguration(style=KanjizeStyle.MIXED)))
    # 446兆8千億8513万2千

Metadata

Release files for kanjize 1.5.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 kanjize 1.5.0
File Size Uploaded Provenance Actions
kanjize-1.5.0.tar.gz 6.3 kB Without provenance Details for kanjize-1.5.0.tar.gz

Built distribution (wheel)

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

Total release size: 13.0 kB

Release files / kanjize-1.5.0.tar.gz

Download URL kanjize-1.5.0.tar.gz
Size 6.3 kB
Tags Source
SHA-256 checksum
How to use checksums
130c4ac37971a1d823412e11edf16a0786e6982ea374d85f82f0fb07bf8aa962
BLAKE2b-256 checksum
How to use checksums
2a095fae81740436c97f555631837aed9a1fb0d230f82e8d376f10934770b047
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

Release files / kanjize-1.5.0-py3-none-any.whl

Download URL kanjize-1.5.0-py3-none-any.whl
Size 6.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2a1539d25949ff7e025faa0ddb001938e904cf49d9e85acd4c6260b2bc6afb4d
BLAKE2b-256 checksum
How to use checksums
b4aa9e1c487c6815a4e0b134ea84fe917b4ea43f4de6e08dc06c1cb59e6f1386
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

Security for kanjize 1.5.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.

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