# Buildsheet autogenerated by ravenadm tool -- Do not edit. NAMEBASE= python-idna VERSION= 3.10 KEYWORDS= python VARIANTS= v11 v12 SDESC[v11]= Int. Domain Names in Applications (3.11) SDESC[v12]= Int. Domain Names in Applications (3.12) HOMEPAGE= none CONTACT= Python_Automaton[python@ironwolf.systems] DOWNLOAD_GROUPS= main SITES[main]= PYPIWHL/76/c6/c88e154df9c4e1a2a66ccf0005a88dfb2650c1dffb6f5ce603dfbd452ce3 DISTFILE[1]= idna-3.10-py3-none-any.whl:main DF_INDEX= 1 SPKGS[v11]= single SPKGS[v12]= single OPTIONS_AVAILABLE= PY311 PY312 OPTIONS_STANDARD= none VOPTS[v11]= PY311=ON PY312=OFF VOPTS[v12]= PY311=OFF PY312=ON DISTNAME= idna-3.10.dist-info GENERATED= yes [PY311].USES_ON= python:v11,wheel [PY312].USES_ON= python:v12,wheel [FILE:3107:descriptions/desc.single] Internationalized Domain Names in Applications (IDNA) ===================================================== Support for the Internationalized Domain Names in Applications (IDNA) protocol as specified in [RFC 5891 ]. This is the latest version of the protocol and is sometimes referred to as “IDNA 2008”. This library also provides support for Unicode Technical Standard 46, [Unicode IDNA Compatibility Processing ]. This acts as a suitable replacement for the “encodings.idna” module that comes with the Python standard library, but which only supports the older superseded IDNA specification ([RFC 3490 ]). Basic functions are simply executed: .. code-block:: pycon >>> import idna >>> idna.encode('ドメイン.テスト') b'xn--eckwd4c7c.xn--zckzah' >>> print(idna.decode('xn--eckwd4c7c.xn--zckzah')) ドメイン.テスト Installation ------------ This package is available for installation from PyPI: .. code-block:: bash $ python3 -m pip install idna Usage ----- For typical usage, the encode and decode functions will take a domain name argument and perform a conversion to A-labels or U-labels respectively. .. code-block:: pycon >>> import idna >>> idna.encode('ドメイン.テスト') b'xn--eckwd4c7c.xn--zckzah' >>> print(idna.decode('xn--eckwd4c7c.xn--zckzah')) ドメイン.テスト You may use the codec encoding and decoding methods using the ``idna.codec`` module: .. code-block:: pycon >>> import idna.codec >>> print('домен.испытание'.encode('idna2008')) b'xn--d1acufc.xn--80akhbyknj4f' >>> print(b'xn--d1acufc.xn--80akhbyknj4f'.decode('idna2008')) домен.испытание Conversions can be applied at a per-label basis using the ulabel or alabel functions if necessary: .. code-block:: pycon >>> idna.alabel('测试') b'xn--0zwm56d' Compatibility Mapping (UTS #46) +++++++++++++++++++++++++++++++ As described in [RFC 5895], the IDNA specification does not normalize input from different potential ways a user may input a domain name. This functionality, known as a “mapping”, is considered by the specification to be a local user-interface issue distinct from IDNA conversion functionality. This library provides one such mapping that was developed by the Unicode Consortium. Known as [Unicode IDNA Compatibility Processing ], it provides for both a regular mapping for typical applications, as well as a transitional mapping to help migrate from older IDNA 2003 applications. Strings are preprocessed according to Section 4.4 “Preprocessing for IDNA2008” prior to the IDNA operations. For example, “Königsgäßchen” is not a permissible label as *LATIN CAPITAL LETTER K* is not allowed (nor are capital letters in general). UTS 46 will convert this into lower case prior to applying the IDNA conversion. .. code-block:: pycon >>> import idna >>> idna.encode('Königsgäßchen') ... idna.core.InvalidCodepoint: Codepoint U+004B at position 1 of 'Königsgäßchen' not allowed >>> idna.encode('Königsgäßchen', uts46=True) [FILE:105:distinfo] 946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3 70442 idna-3.10-py3-none-any.whl