pidna
A fast drop-in replacement for idna in Python. Validates and converts internationalized domain names (IDNA 2008 and UTS #46) up to 418x faster on ASCII domains and 10–16x faster on Unicode domains.
Install
pip install pidna
Prebuilt wheels are included for Linux, macOS, and Windows (Python 3.9+, no Rust toolchain needed).
Usage
import pidna
encoded = pidna.encode("münchen.de") # b"xn--mnchen-3ya.de"
decoded = pidna.decode(b"xn--mnchen-3ya.de") # "münchen.de"
uts46 = pidna.encode("API.GitHub.COM", uts46=True) # b"api.github.com"
Performance
| Workload | idna (x86-64) |
pidna (x86-64 AVX2) |
pidna (Apple M4 NEON) |
|---|---|---|---|
Small ASCII (api.github.com, 50k) |
408.97 ms | 6.02 ms (68.0x) | 5.78 ms (47.0x vs M4 idna) |
Medium ASCII UTS #46 (API.GitHub.COM, 50k) |
466.38 ms | 9.54 ms (48.9x) | 8.81 ms (31.3x vs M4 idna) |
| Long ASCII (8 labels, 20k) | 1501.13 ms | 3.59 ms (418.1x) | 3.45 ms (286.2x vs M4 idna) |
Unicode UTS #46 (münchen.de, 20k) |
243.33 ms | 24.59 ms (9.9x) | 18.94 ms (7.0x vs M4 idna) |
CJK (例え.jp, 20k) |
179.37 ms | 10.93 ms (16.4x) | 7.28 ms (15.1x vs M4 idna) |
Under the hood
- Written in Rust (PyO3) with zero external runtime dependencies and runtime SIMD dispatch (AVX2 / SSE2 / ARM64 NEON)
- Compact
cp39-abi3wheel with PEP 561 type stubs (py.typed+__init__.pyi) - Verified with Hypothesis differential fuzzing against
idna
License
MIT
Metadata
Release files for pidna 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pidna-0.1.0.tar.gz | 116.2 kB | With provenance | Details for pidna-0.1.0.tar.gz |
Built distributions (wheels)
Total release size: 2.8 MB
Release files / pidna-0.1.0.tar.gz
| Download URL | pidna-0.1.0.tar.gz |
|---|---|
| Size | 116.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3f058a26524ecf40c91f3b275a567906467cecfe519152ae7f85462eafae49ee
|
|
BLAKE2b-256 checksum How to use checksums |
3f4a59a38d0e3f6ea3b1a08d2fb064ee4d6d7eeac9a72f1077a7192664502d3c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logRelease files / pidna-0.1.0-cp39-abi3-win_amd64.whl
| Download URL | pidna-0.1.0-cp39-abi3-win_amd64.whl |
|---|---|
| Size | 249.5 kB |
| Tags | CPython 3.9 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
24d3e51e7a5f158c95c5606d9b8b8cdf53ef68f378c37756d7ec84eea211057c
|
|
BLAKE2b-256 checksum How to use checksums |
c7df99eae323ce3233319ec4e3b94a5a9f30d04832b978638521af0306c989a8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logRelease files / pidna-0.1.0-cp39-abi3-musllinux_1_2_x86_64.whl
| Download URL | pidna-0.1.0-cp39-abi3-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 485.9 kB |
| Tags | CPython 3.9 Linux musl 1.2+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
276b9c548ddc1a742769829512a41d50e1714fd5d935c57fa58c75a37eb92233
|
|
BLAKE2b-256 checksum How to use checksums |
49ba5d7208780a728327574a316da14d32007ec6009a4f06cccea538ca658d0a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logRelease files / pidna-0.1.0-cp39-abi3-musllinux_1_2_aarch64.whl
| Download URL | pidna-0.1.0-cp39-abi3-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 495.7 kB |
| Tags | CPython 3.9 Linux musl 1.2+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
3f6de9417898e810f1f023e4c2a743932a5113d86532e40b96d289abfcdd0857
|
|
BLAKE2b-256 checksum How to use checksums |
5b8f45d84cd81b4475167d2bceb496061201936134ea6e7f27c9470e0993ee39
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logRelease files / pidna-0.1.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | pidna-0.1.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 381.3 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
bc81a2c435d82339785621eeafc6d2beb6ba6edb1c59144a35206c0e52ff454e
|
|
BLAKE2b-256 checksum How to use checksums |
915b3043f582b719632c1bae56e33f636871b4c6cc63f9e1bf38d432fb05a750
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logRelease files / pidna-0.1.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
| Download URL | pidna-0.1.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl |
|---|---|
| Size | 400.9 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
804e805fcc8589944f1b7ccc45495a990370736f39b8924df0a312be423c195e
|
|
BLAKE2b-256 checksum How to use checksums |
b6988c58548bec261b98fe1f95fd45dc5906f4f6d4129bf3a735da356d0c51ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logRelease files / pidna-0.1.0-cp39-abi3-macosx_11_0_arm64.whl
| Download URL | pidna-0.1.0-cp39-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 338.4 kB |
| Tags | CPython 3.9 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
1f6227ad5ca1e6bdc135f24d56fc0a82dd0706ef399ebbe07a086d4eeeb5f945
|
|
BLAKE2b-256 checksum How to use checksums |
90cda9ac4e1592fd6de42e0ef6d54a87fc30875c505fb4df025fe20daa465936
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logRelease files / pidna-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl
| Download URL | pidna-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 345.3 kB |
| Tags | CPython 3.9 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
a9b76a53fd40d9844130c38beeee69c40dd7f49219371943888dd45dc04efe7b
|
|
BLAKE2b-256 checksum How to use checksums |
d2fb8945b818ac07018ccb2f11b344bd5935e446b5f9d25459a7b3f826cb0526
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logSecurity for pidna 0.1.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.
Full provenance
All 8 files in this release have been uploaded with provenance metadata.
Attestation for pidna-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logA 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.