1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
7 SDESC[py310]= Int. Domain Names in Applications (3.10)
8 SDESC[py39]= Int. Domain Names in Applications (3.9)
10 CONTACT= Python_Automaton[python@ironwolf.systems]
13 SITES[main]= PYPIWHL/fc/34/3030de6f1370931b9dbb4dad48f6ab1015ab1d32447850b9fc94e60097be
14 DISTFILE[1]= idna-3.4-py3-none-any.whl:main
19 OPTIONS_AVAILABLE= PY39 PY310
20 OPTIONS_STANDARD= none
21 VOPTS[py310]= PY39=OFF PY310=ON
22 VOPTS[py39]= PY39=ON PY310=OFF
24 DISTNAME= idna-3.4.dist-info
28 [PY39].USES_ON= python:py39,wheel
30 [PY310].USES_ON= python:py310,wheel
32 [FILE:3070:descriptions/desc.single]
33 Internationalized Domain Names in Applications (IDNA)
34 =====================================================
36 Support for the Internationalized Domain Names in
37 Applications (IDNA) protocol as specified in [RFC 5891
38 ]. This is the latest version of
39 the protocol and is sometimes referred to as “IDNA 2008”.
41 This library also provides support for Unicode Technical
42 Standard 46, [Unicode IDNA Compatibility Processing
45 This acts as a suitable replacement for the “encodings.idna”
46 module that comes with the Python standard library, but which
47 only supports the older superseded IDNA specification ([RFC 3490
50 Basic functions are simply executed:
55 >>> idna.encode('ドメイン.テスト')
56 b'xn--eckwd4c7c.xn--zckzah'
57 >>> print(idna.decode('xn--eckwd4c7c.xn--zckzah'))
63 This package is available for installation from PyPI:
67 $ python3 -m pip install idna
72 For typical usage, the encode and decode functions will take a
73 domain name argument and perform a conversion to A-labels or U-labels
79 >>> idna.encode('ドメイン.テスト')
80 b'xn--eckwd4c7c.xn--zckzah'
81 >>> print(idna.decode('xn--eckwd4c7c.xn--zckzah'))
84 You may use the codec encoding and decoding methods using the
85 ``idna.codec`` module:
90 >>> print('домен.испытание'.encode('idna'))
91 b'xn--d1acufc.xn--80akhbyknj4f'
92 >>> print(b'xn--d1acufc.xn--80akhbyknj4f'.decode('idna'))
95 Conversions can be applied at a per-label basis using the ulabel or
96 alabel functions if necessary:
100 >>> idna.alabel('测试')
103 Compatibility Mapping (UTS #46)
104 +++++++++++++++++++++++++++++++
106 As described in [RFC 5895], the
107 IDNA specification does not normalize input from different potential
108 ways a user may input a domain name. This functionality, known as
109 a “mapping”, is considered by the specification to be a local
110 user-interface issue distinct from IDNA conversion functionality.
112 This library provides one such mapping, that was developed by the
113 Unicode Consortium. Known as [Unicode IDNA Compatibility Processing
114 ], it provides for both a regular
115 mapping for typical applications, as well as a transitional mapping to
116 help migrate from older IDNA 2003 applications.
118 For example, “Königsgäßchen” is not a permissible label as *LATIN
119 CAPITAL LETTER K* is not allowed (nor are capital letters in general).
120 UTS 46 will convert this into lower case prior to applying the IDNA
123 .. code-block:: pycon
126 >>> idna.encode('Königsgäßchen')
128 idna.core.InvalidCodepoint: Codepoint U+004B at position 1 of
129 'Königsgäßchen' not allowed
130 >>> idna.encode('Königsgäßchen', uts46=True)
131 b'xn--knigsgchen-b4a3dun'
132 >>> print(idna.decode('xn--knigsgchen-b4a3dun'))
136 90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2 61538 idna-3.4-py3-none-any.whl