Install & Compatibility
Where this runs
tested against v0.6.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.9MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 1.7s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
hiragana_to_katakana
✓ from habachen import hiragana_to_katakana
✗ import habachen; habachen.hiragana_to_katakana
Direct import works; the dot notation also works but may be less common in quickstarts.
katakana_to_hiragana
✓ from habachen import katakana_to_hiragana
Standard import path.
to_hankaku_katakana
✓ from habachen import to_hankaku_katakana
Available since v0.4.0? Actually introduced earlier, but ensure use from habachen.
Basic usage: convert between hiragana, katakana, and half-width katakana.
from habachen import hiragana_to_katakana, katakana_to_hiragana, to_hankaku_katakana
result = hiragana_to_katakana('あいう')
print(result) # アイウ
result = katakana_to_hiragana('カキク')
print(result) # かきく
result = to_hankaku_katakana('カタカナ')
print(result) # タタナ(?? check actual)
print(result)
Debug
Known issues
gotchaThe function `hiragana_to_katakana` with `hankaku=True` raises a `ValueError` if the `ignore` string contains characters that are not convertible to hankaku katakana (e.g., ゐ or ゟ). This is more strict than in prior versions.fixEnsure the ignore string only contains characters that can be converted to hankaku katakana, or set hankaku=False.
affects: >=0.5.0
deprecatedNo deprecations noted; free-threading support is opt-in via Python build flags.
breakingVersion 0.5.0 introduced stricter error handling: previously, `hiragana_to_katakana` with hankaku=True and invalid ignore chars may have silently ignored them; now it raises ValueError.fixReview code that uses hankaku=True with ignore parameter and remove characters that cannot be converted (e.g., ゐ, ゟ).
affects: >=0.5.0
Errors
Common errors & fixes
ValueError: The 'ignore' string contains characters that are not convertible to hankaku katakana: ...
Using hiragana_to_katakana with hankaku=True and ignore string containing characters like ゐ or ゟ that have no hankaku equivalent.
fixRemove problematic characters from ignore string, or set hankaku=False.
ModuleNotFoundError: No module named 'habachen'
habachen is not installed or not in the Python path.
fixRun `pip install habachen` ensure it's installed for the correct Python interpreter.
Upgrade
Version history
0.6.0latest on PyPI · released Oct 8, 2025
Audit
Dependencies
No dependency data recorded yet.