Ravenports generated: 16 Jun 2020 14:46
[ravenports.git] / bucket_92 / python-uritemplate
1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
2
3 NAMEBASE=               python-uritemplate
4 VERSION=                3.0.1
5 KEYWORDS=               python
6 VARIANTS=               py38 py37
7 SDESC[py37]=            URI templates (PY37)
8 SDESC[py38]=            URI templates (PY38)
9 HOMEPAGE=               https://uritemplate.readthedocs.org
10 CONTACT=                Python_Automaton[python@ironwolf.systems]
11
12 DOWNLOAD_GROUPS=        main
13 SITES[main]=            PYPI/u/uritemplate
14 DISTFILE[1]=            uritemplate-3.0.1.tar.gz:main
15 DF_INDEX=               1
16 SPKGS[py37]=            single
17 SPKGS[py38]=            single
18
19 OPTIONS_AVAILABLE=      PY38 PY37
20 OPTIONS_STANDARD=       none
21 VOPTS[py37]=            PY38=OFF PY37=ON
22 VOPTS[py38]=            PY38=ON PY37=OFF
23
24 DISTNAME=               uritemplate-3.0.1
25
26 GENERATED=              yes
27
28 [PY37].USES_ON=                         python:py37
29
30 [PY38].USES_ON=                         python:py38
31
32 [FILE:2495:descriptions/desc.single]
33 uritemplate
34 ===========
35
36 Documentation_ -- GitHub_ -- Travis-CI_
37
38 Simple python library to deal with `URI Templates`_. The API looks like
39
40 .. code-block:: python
41
42     from uritemplate import URITemplate, expand
43
44     # NOTE: URI params must be strings not integers
45
46     gist_uri = 'https://api.github.com/users/sigmavirus24/gists{/gist_id}'
47     t = URITemplate(gist_uri)
48     print(t.expand(gist_id='123456'))
49     # => https://api.github.com/users/sigmavirus24/gists/123456
50
51     # or
52     print(expand(gist_uri, gist_id='123456'))
53
54     # also
55     t.expand({'gist_id': '123456'})
56     print(expand(gist_uri, {'gist_id': '123456'}))
57
58 Where it might be useful to have a class
59
60 .. code-block:: python
61
62     import requests
63
64     class GitHubUser(object):
65         url = URITemplate('https://api.github.com/user{/login}')
66         def __init__(self, name):
67             self.api_url = url.expand(login=name)
68             response = requests.get(self.api_url)
69             if response.status_code == 200:
70                 self.__dict__.update(response.json())
71
72 When the module containing this class is loaded, ``GitHubUser.url`` is 
73 evaluated and so the template is created once. It's often hard to notice in
74
75 Python, but object creation can consume a great deal of time and so can the
76
77 re module which uritemplate relies on. Constructing the object once should 
78 reduce the amount of time your code takes to run.
79
80 Installing
81 ----------
82
83 ::
84
85     pip install uritemplate
86
87 License
88 -------
89
90 Modified BSD license_
91
92 .. _Documentation: https://uritemplate.readthedocs.io/
93 .. _GitHub: https://github.com/python-hyper/uritemplate
94 .. _Travis-CI: https://travis-ci.org/python-hyper/uritemplate
95 .. _URI Templates: http://tools.ietf.org/html/rfc6570
96 .. _license:
97 https://github.com/python-hyper/uritemplate/blob/master/LICENSE
98
99 Changelog - uritemplate
100 =======================
101
102 3.0.1 - 2019-12-19
103 ------------------
104
105 - Update to Python 3.6, 3.7, and 3.8
106 - Drop support for Python 2.6, 3.2, and 3.3
107 - Ignore None in list argument expansion
108 - Handle a list with an empty string appropriately
109
110 3.0.0 - 2016-08-29
111 ------------------
112
113 - Match major version number of uritemplate.py
114
115 2.0.0 - 2016-08-29
116 ------------------
117
118 - Merge uritemplate.py into uritemplate
119
120 Changelog - uritemplate.py
121 ==========================
122
123 3.0.2 - 2015-08-30
124 ------------------
125
126 - Fix meta-package requirements.
127
128 3.0.1 - 2015-08-29
129 ------------------
130
131 - Deprecate in favor of uritemplate. This package is now a metapackage that
132   depends on uritemplate.
133
134
135 [FILE:103:distinfo]
136 5af8ad10cec94f215e3f48112de2022e1d5a37ed427fbd88652fa908f2ab7cae        32806 uritemplate-3.0.1.tar.gz
137