Registry / serialization / habachen

habachen

JSON →
library0.6.0pypypi✓ verified 85d ago

Yet Another Fast Japanese String Converter. A Python library for converting between hiragana, katakana, and half-width katakana, with support for free-threading mode. Current version: 0.6.0, supports Python >=3.8.

pip install habachen
INSTALL
IMPORT
SIG · HABACHEN
H
habachen
serializationpythonv0.6.0
Install
1.7s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
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
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.9MB
glibc
py 3.103.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.
fix
Ensure 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.
fix
Review 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.
fix
Remove problematic characters from ignore string, or set hankaku=False.
ModuleNotFoundError: No module named 'habachen'
habachen is not installed or not in the Python path.
fix
Run `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.

Agent activity
8 hits · last 30 days
node
8
Resources
habachen — pip install habachen · libregistry