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