Registry / serialization / domain2idna

domain2idna

JSON →
library1.12.4pypypi✓ verified 86d ago

A Python tool to convert domains (or files containing domain lists) to IDNA (Punycode) format. Current version 1.12.4 supports Python >=3.6.2, <4.0. Release cadence is irregular with maintenance updates.

pip install domain2idna
INSTALL
IMPORT
SIG · DOMAIN2IDNA
D
domain2idna
serializationpythonv1.12.4
Install
1.9s avg
Import
—
Disk
20MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v1.12.4 · 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.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 18.1MB
glibc
py 3.10–3.95 runs
installs and imports cleanly · install 1.9s · import 0.000s · 19MB
20MB installed
● package 20MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Converter
✓ from domain2idna import Converter
✗ from domain2idna import convert
converter
✓ from domain2idna import converter
✗ from domain2idna import convert
get
✓ from domain2idna import get
✗ from domain2idna import convert

Convert a single domain with non-ASCII characters to IDNA (Punycode) format.

from domain2idna import convert result = convert('münchen.de') print(result) # Output: xn--mnchen-3ya.de
domain2idna --version
Debug
Known issues
deprecatedThe 'get' function was deprecated in v1.10.1 and removed in later versions. Use 'convert' instead.
fix
Replace 'get()' with 'convert()'.
affects: >=1.10.1
gotchaThe library may return the input unchanged if it is already ASCII or contains common hostnames like 'localhost'. Check the documentation for ignored domains.
fix
Be aware that certain strings (e.g., 'localhost', '0.0.0.0') are ignored and returned as-is.
affects: all
Upgrade
Version history
1.12.4latest on PyPI · released Jan 24, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
domain2idna — pip install domain2idna · libregistry