File: miscellaneous.rst

package info (click to toggle)
python-rfc3986 2.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 500 kB
  • sloc: python: 2,899; makefile: 18
file content (231 lines) | stat: -rw-r--r-- 6,776 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
==========================
 Miscellaneous Submodules
==========================

There are several submodules in |rfc3986| that are not meant to be exposed to
users directly but which are valuable to document, regardless.

.. data:: rfc3986.misc.UseExisting

    A sentinel object to make certain APIs simpler for users.

.. module:: rfc3986.abnf_regexp

The :mod:`rfc3986.abnf_regexp` module contains the regular expressions written
from the RFC's ABNF. The :mod:`rfc3986.misc` module contains compiled regular
expressions from :mod:`rfc3986.abnf_regexp` and previously contained those
regular expressions.

.. data:: rfc3986.abnf_regexp.GEN_DELIMS
.. data:: rfc3986.abnf_regexp.GENERIC_DELIMITERS

    The string containing all of the generic delimiters as defined on
    `page 13 <https://tools.ietf.org/html/rfc3986#page-13>`__.

.. data:: rfc3986.abnf_regexp.GENERIC_DELIMITERS_SET

    :data:`rfc3986.abnf_regexp.GEN_DELIMS` represented as a :class:`set`.

.. data:: rfc3986.abnf_regexp.SUB_DELIMS
.. data:: rfc3986.abnf_regexp.SUB_DELIMITERS

    The string containing all of the 'sub' delimiters as defined on
    `page 13 <https://tools.ietf.org/html/rfc3986#page-13>`__.

.. data:: rfc3986.abnf_regexp.SUB_DELIMITERS_SET

    :data:`rfc3986.abnf_regexp.SUB_DELIMS` represented as a :class:`set`.

.. data:: rfc3986.abnf_regexp.SUB_DELIMITERS_RE

    :data:`rfc3986.abnf_regexp.SUB_DELIMS` with the ``*`` escaped for use in
    regular expressions.

.. data:: rfc3986.abnf_regexp.RESERVED_CHARS_SET

    A :class:`set` constructed of :data:`GEN_DELIMS` and :data:`SUB_DELIMS`.
    This union is defined on `page 13
    <https://tools.ietf.org/html/rfc3986#page-13>`__.

.. data:: rfc3986.abnf_regexp.ALPHA

    The string of upper- and lower-case letters in USASCII.

.. data:: rfc3986.abnf_regexp.DIGIT

    The string of digits 0 through 9.

.. data:: rfc3986.abnf_regexp.UNRESERVED
.. data:: rfc3986.abnf_regexp.UNRESERVED_CHARS

    The string of unreserved characters defined in :rfc:`3986#section-2.3`.

.. data:: rfc3986.abnf_regexp.UNRESERVED_CHARS_SET

    :data:`rfc3986.abnf_regexp.UNRESERVED_CHARS` represented as a
    :class:`set`.

.. data:: rfc3986.abnf_regexp.NON_PCT_ENCODED_SET

    The non-percent encoded characters represented as a :class:`set`.

.. data:: rfc3986.abnf_regexp.UNRESERVED_RE

    Optimized regular expression for unreserved characters.

.. data:: rfc3986.abnf_regexp.SCHEME_RE

    Stricter regular expression to match and validate the scheme part
    of a URI.

.. data:: rfc3986.abnf_regexp.COMPONENT_PATTERN_DICT

    Dictionary with regular expressions to match various components in
    a URI. Except for :data:`rfc3986.abnf_regexp.SCHEME_RE`, all patterns
    are from :rfc:`3986#appendix-B`.

.. data:: rfc3986.abnf_regexp.URL_PARSING_RE

    Regular expression compposed from the components in
    :data:`rfc3986.abnf_regexp.COMPONENT_PATTERN_DICT`.

.. data:: rfc3986.abnf_regexp.HEXDIG_RE

    Hexadecimal characters used in each piece of an IPv6 address.
    See :rfc:`3986#section-3.2.2`.

.. data:: rfc3986.abnf_regexp.LS32_RE

    Lease significant 32 bits of an IPv6 address.
    See :rfc:`3986#section-3.2.2`.

.. data:: rfc3986.abnf_regexp.REG_NAME
.. data:: rfc3986.abnf_regexp.REGULAR_NAME_RE

    The pattern for a regular name, e.g., ``www.google.com``,
    ``api.github.com``.
    See :rfc:`3986#section-3.2.2`.

.. data:: rfc3986.abnf_regexp.IPv4_RE

    The pattern for an IPv4 address, e.g., ``192.168.255.255``.
    See :rfc:`3986#section-3.2.2`.

.. data:: rfc3986.abnf_regexp.IPv6_RE

    The pattern for an IPv6 address, e.g., ``::1``.
    See :rfc:`3986#section-3.2.2`.

.. data:: rfc3986.abnf_regexp.IPv_FUTURE_RE

    A regular expression to parse out IPv Futures.
    See :rfc:`3986#section-3.2.2`.

.. data:: rfc3986.abnf_regexp.IP_LITERAL_RE

    Pattern to match IPv6 addresses and IPv Future addresses.
    See :rfc:`3986#section-3.2.2`.

.. data:: rfc3986.abnf_regexp.HOST_RE
.. data:: rfc3986.abnf_regexp.HOST_PATTERN

    Pattern to match and validate the host piece of an authority.
    This is composed of

    - :data:`rfc3986.abnf_regexp.REG_NAME`
    - :data:`rfc3986.abnf_regexp.IPv4_RE`
    - :data:`rfc3986.abnf_regexp.IP_LITERAL_RE`

    See :rfc:`3986#section-3.2.2`.

.. data:: rfc3986.abnf_regexp.USERINFO_RE

    Pattern to match and validate the user information portion of
    an authority component.

    See :rfc:`3986#section-3.2.2`.

.. data:: rfc3986.abnf_regexp.PORT_RE

    Pattern to match and validate the port portion of an authority
    component.

    See :rfc:`3986#section-3.2.2`.

.. data:: rfc3986.abnf_regexp.PCT_ENCODED
.. data:: rfc3986.abnf_regexp.PERCENT_ENCODED

    Regular expression to match percent encoded character values.

.. data:: rfc3986.abnf_regexp.PCHAR

    Regular expression to match printable characters.

.. data:: rfc3986.abnf_regexp.PATH_RE

    Regular expression to match and validate the path component of a URI.

    See :rfc:`3986#section-3.3`.

.. data:: rfc3986.abnf_regexp.PATH_EMPTY
.. data:: rfc3986.abnf_regexp.PATH_ROOTLESS
.. data:: rfc3986.abnf_regexp.PATH_NOSCHEME
.. data:: rfc3986.abnf_regexp.PATH_ABSOLUTE
.. data:: rfc3986.abnf_regexp.PATH_ABEMPTY

    Components of the :data:`rfc3986.abnf_regexp.PATH_RE`.

    See :rfc:`3986#section-3.3`.

.. data:: rfc3986.abnf_regexp.QUERY_RE

    Regular expression to parse and validate the query component of a URI.

.. data:: rfc3986.abnf_regexp.FRAGMENT_RE

    Regular expression to parse and validate the fragment component of a URI.

.. data:: rfc3986.abnf_regexp.RELATIVE_PART_RE

    Regular expression to parse the relative URI when resolving URIs.

.. data:: rfc3986.abnf_regexp.HIER_PART_RE

    The hierarchical part of a URI. This regular expression is used when
    resolving relative URIs.

    See :rfc:`3986#section-3`.

.. module:: rfc3986.misc

.. data:: rfc3986.misc.URI_MATCHER

    Compiled version of :data:`rfc3986.abnf_regexp.URL_PARSING_RE`.

.. data:: rfc3986.misc.SUBAUTHORITY_MATCHER

    Compiled compilation of :data:`rfc3986.abnf_regexp.USERINFO_RE`,
    :data:`rfc3986.abnf_regexp.HOST_PATTERN`,
    :data:`rfc3986.abnf_regexp.PORT_RE`.

.. data:: rfc3986.misc.SCHEME_MATCHER

    Compiled version of :data:`rfc3986.abnf_regexp.SCHEME_RE`.

.. data:: rfc3986.misc.IPv4_MATCHER

    Compiled version of :data:`rfc3986.abnf_regexp.IPv4_RE`.

.. data:: rfc3986.misc.PATH_MATCHER

    Compiled version of :data:`rfc3986.abnf_regexp.PATH_RE`.

.. data:: rfc3986.misc.QUERY_MATCHER

    Compiled version of :data:`rfc3986.abnf_regexp.QUERY_RE`.

.. data:: rfc3986.misc.RELATIVE_REF_MATCHER

    Compiled compilation of :data:`rfc3986.abnf_regexp.SCHEME_RE`,
    :data:`rfc3986.abnf_regexp.HIER_PART_RE`,
    :data:`rfc3986.abnf_regexp.QUERY_RE`.