1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
7 SDESC[v11]= Int. Domain Names in Applications (3.11)
8 SDESC[v12]= Int. Domain Names in Applications (3.12)
10 CONTACT= Python_Automaton[python@ironwolf.systems]
13 SITES[main]= PYPIWHL/e5/3e/741d8c82801c347547f8a2a06aa57dbb1992be9e948df2ea0eda2c8b79e8
14 DISTFILE[1]= idna-3.7-py3-none-any.whl:main
19 OPTIONS_AVAILABLE= PY311 PY312
20 OPTIONS_STANDARD= none
21 VOPTS[v11]= PY311=ON PY312=OFF
22 VOPTS[v12]= PY311=OFF PY312=ON
24 DISTNAME= idna-3.7.dist-info
28 [PY311].USES_ON= python:v11,wheel
30 [PY312].USES_ON= python:v12,wheel
32 [FILE:3077: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('idna2008'))
91 b'xn--d1acufc.xn--80akhbyknj4f'
92 >>> print(b'xn--d1acufc.xn--80akhbyknj4f'.decode('idna2008'))
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 82fee1fc78add43492d3a1898bfa6d8a904cc97d8427f683ed8e798d07761aa0 66836 idna-3.7-py3-none-any.whl