Ravenports generated: 10 Feb 2024 22:55
[ravenports.git] / bucket_8A / python-rfc3987
1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
2
3 NAMEBASE=               python-rfc3987
4 VERSION=                1.3.8
5 KEYWORDS=               python
6 VARIANTS=               v11 v12
7 SDESC[v11]=             Parsing and validation of URIs and IRIs (3.11)
8 SDESC[v12]=             Parsing and validation of URIs and IRIs (3.12)
9 HOMEPAGE=               https://pypi.python.org/pypi/rfc3987
10 CONTACT=                Python_Automaton[python@ironwolf.systems]
11
12 DOWNLOAD_GROUPS=        main
13 SITES[main]=            PYPIWHL/65/d4/f7407c3d15d5ac779c3dd34fbbc6ea2090f77bd7dd12f207ccf881551208
14 DISTFILE[1]=            rfc3987-1.3.8-py2.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=               rfc3987-1.3.8.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:3592:descriptions/desc.single]
33 This module provides regular expressions according to `RFC 3986 "Uniform
34 Resource Identifier (URI): Generic Syntax"
35 <http://tools.ietf.org/html/rfc3986>`_ and `RFC 3987 "Internationalized
36 Resource Identifiers (IRIs)" <http://tools.ietf.org/html/rfc3987>`_, and
37 utilities for composition and relative resolution of references.
38
39 API
40 ---
41
42 **match** (string, rule='IRI_reference')
43     Convenience function for checking if `string` matches a specific rule.
44
45     Returns a match object or None::
46
47         >>> assert match('%C7X', 'pct_encoded') is None
48         >>> assert match('%C7', 'pct_encoded')
49         >>> assert match('%c7', 'pct_encoded')
50
51 **parse** (string, rule='IRI_reference')
52     Parses `string` according to `rule` into a dict of subcomponents.
53
54     If `rule` is None, parse an IRI_reference [without validation
55    ].
56
57     If regex_ is available, any rule is supported; with re_, `rule` must be
58     'IRI_reference' or some special case thereof ('IRI', 'absolute_IRI',
59     'irelative_ref', 'irelative_part', 'URI_reference', 'URI',
60 'absolute_URI',
61     'relative_ref', 'relative_part'). ::
62
63         >>> d = parse('http://tools.ietf.org/html/rfc3986#appendix-A',
64         ...           rule='URI')
65         >>> assert all([ d['scheme'] == 'http',
66         ...              d['authority'] == 'tools.ietf.org',
67         ...              d['path'] == '/html/rfc3986',
68         ...              d['query'] == None,
69         ...              d['fragment'] == 'appendix-A'])
70
71 **compose** (\*\*parts)
72     Returns an URI composed_ from named parts.
73
74     .. _composed: http://tools.ietf.org/html/rfc3986#section-5.3
75
76 **resolve** (base, uriref, strict=True, return_parts=False)
77     Resolves_ an `URI reference` relative to a `base` URI.
78
79     [Test cases]::
80
81         >>> base = resolve.test_cases_base
82         >>> for relative, resolved in resolve.test_cases.items():
83         ...     assert resolve(base, relative) == resolved
84
85     If `return_parts` is True, returns a dict of named parts instead of
86     a string.
87
88     Examples::
89
90         >>> assert resolve('urn:rootless', '../../name') == 'urn:name'
91         >>> assert resolve('urn:root/less', '../../name') == 'urn:/name'
92         >>> assert resolve('http://a/b', 'http:g') == 'http:g'
93         >>> assert resolve('http://a/b', 'http:g', strict=False) ==
94 'http://a/g'
95
96     .. _Resolves: http://tools.ietf.org/html/rfc3986#section-5.2
97
98 **patterns**
99     A dict of regular expressions with useful group names.
100     Compilable (with regex_ only) without need for any particular
101 compilation
102     flag.
103
104 **[bmp_][u]patterns[_no_names]**
105     Alternative versions of `patterns`.
106     [u]nicode strings without group names for the re_ module.
107     BMP only for narrow builds.
108
109 **get_compiled_pattern** (rule, flags=0)
110     Returns a compiled pattern object for a rule name or template string.
111
112     Usage for validation::
113
114         >>> uri = get_compiled_pattern('^%(URI)s$')
115         >>> assert
116 uri.match('http://tools.ietf.org/html/rfc3986#appendix-A')
117         >>> assert not
118 get_compiled_pattern('^%(relative_ref)s$').match('#f#g')
119         >>> from unicodedata import lookup
120         >>> smp = 'urn:' + lookup('OLD ITALIC LETTER A')  # U+00010300
121         >>> assert not uri.match(smp)
122         >>> m = get_compiled_pattern('^%(IRI)s$').match(smp)
123
124     On narrow builds, non-BMP characters are (incorrectly) excluded::
125
126         >>> assert NARROW_BUILD == (not m)
127
128     For parsing, some subcomponents are captured in named groups (*only if*
129     regex_ is available, otherwise see `parse`)::
130
131         >>> match =
132 uri.match('http://tools.ietf.org/html/rfc3986#appendix-A')
133
134
135 [FILE:113:distinfo]
136 10702b1e51e5658843460b189b185c0366d2cf4cff716f13111b0ea9fd2dce53        13377 rfc3987-1.3.8-py2.py3-none-any.whl
137