Ravenports generated: 11 Apr 2024 21:28
[ravenports.git] / bucket_95 / python-idna
1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
2
3 NAMEBASE=               python-idna
4 VERSION=                3.7
5 KEYWORDS=               python
6 VARIANTS=               v11 v12
7 SDESC[v11]=             Int. Domain Names in Applications (3.11)
8 SDESC[v12]=             Int. Domain Names in Applications (3.12)
9 HOMEPAGE=               none
10 CONTACT=                Python_Automaton[python@ironwolf.systems]
11
12 DOWNLOAD_GROUPS=        main
13 SITES[main]=            PYPIWHL/e5/3e/741d8c82801c347547f8a2a06aa57dbb1992be9e948df2ea0eda2c8b79e8
14 DISTFILE[1]=            idna-3.7-py3-none-any.whl:main
15 DF_INDEX=               1
16 SPKGS[v11]=             single
17 SPKGS[v12]=             single
18
19 OPTIONS_AVAILABLE=      PY311 PY312
20 OPTIONS_STANDARD=       none
21 VOPTS[v11]=             PY311=ON PY312=OFF
22 VOPTS[v12]=             PY311=OFF PY312=ON
23
24 DISTNAME=               idna-3.7.dist-info
25
26 GENERATED=              yes
27
28 [PY311].USES_ON=                        python:v11,wheel
29
30 [PY312].USES_ON=                        python:v12,wheel
31
32 [FILE:3077:descriptions/desc.single]
33 Internationalized Domain Names in Applications (IDNA)
34 =====================================================
35
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”.
40
41 This library also provides support for Unicode Technical
42 Standard 46, [Unicode IDNA Compatibility Processing
43 ].
44
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
48 ]).
49
50 Basic functions are simply executed:
51
52 .. code-block:: pycon
53
54     >>> import idna
55     >>> idna.encode('ドメイン.テスト')
56     b'xn--eckwd4c7c.xn--zckzah'
57     >>> print(idna.decode('xn--eckwd4c7c.xn--zckzah'))
58     ドメイン.テスト
59
60 Installation
61 ------------
62
63 This package is available for installation from PyPI:
64
65 .. code-block:: bash
66
67     $ python3 -m pip install idna
68
69 Usage
70 -----
71
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
74 respectively.
75
76 .. code-block:: pycon
77
78     >>> import idna
79     >>> idna.encode('ドメイン.テスト')
80     b'xn--eckwd4c7c.xn--zckzah'
81     >>> print(idna.decode('xn--eckwd4c7c.xn--zckzah'))
82     ドメイン.テスト
83
84 You may use the codec encoding and decoding methods using the
85 ``idna.codec`` module:
86
87 .. code-block:: pycon
88
89     >>> import idna.codec
90     >>> print('домен.испытание'.encode('idna2008'))
91     b'xn--d1acufc.xn--80akhbyknj4f'
92     >>> print(b'xn--d1acufc.xn--80akhbyknj4f'.decode('idna2008'))
93     домен.испытание
94
95 Conversions can be applied at a per-label basis using the ulabel or
96 alabel functions if necessary:
97
98 .. code-block:: pycon
99
100     >>> idna.alabel('测试')
101     b'xn--0zwm56d'
102
103 Compatibility Mapping (UTS #46)
104 +++++++++++++++++++++++++++++++
105
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.
111
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.
117
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
121 conversion.
122
123 .. code-block:: pycon
124
125     >>> import idna
126     >>> idna.encode('Königsgäßchen')
127     ...
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'))
133
134
135 [FILE:104:distinfo]
136 82fee1fc78add43492d3a1898bfa6d8a904cc97d8427f683ed8e798d07761aa0        66836 idna-3.7-py3-none-any.whl
137