commit | author | age
|
c4d7f0
|
1 |
.. _glossary: |
PE |
2 |
|
74e3c4
|
3 |
Glossary |
878328
|
4 |
======== |
c4d7f0
|
5 |
|
PE |
6 |
.. glossary:: |
878328
|
7 |
:sorted: |
c4d7f0
|
8 |
|
8c56ae
|
9 |
request |
050868
|
10 |
An object that represents an HTTP request, usually an instance of the |
CM |
11 |
:class:`pyramid.request.Request` class. See :ref:`webob_chapter` |
|
12 |
(narrative) and :ref:`request_module` (API documentation) for |
|
13 |
information about request objects. |
bc857e
|
14 |
|
e25a70
|
15 |
request factory |
050868
|
16 |
An object which, provided a :term:`WSGI` environment as a single |
CM |
17 |
positional argument, returns a Pyramid-compatible request. |
e25a70
|
18 |
|
e8a666
|
19 |
response factory |
ff01cd
|
20 |
An object which, provided a :term:`request` as a single positional |
da5f5f
|
21 |
argument, returns a Pyramid-compatible response. See |
MM |
22 |
:class:`pyramid.interfaces.IResponseFactory`. |
e8a666
|
23 |
|
8c56ae
|
24 |
response |
d868ff
|
25 |
An object returned by a :term:`view callable` that represents response |
0e5cd0
|
26 |
data returned to the requesting user agent. It must implement the |
d868ff
|
27 |
:class:`pyramid.interfaces.IResponse` interface. A response object is |
CM |
28 |
typically an instance of the :class:`pyramid.response.Response` class or |
|
29 |
a subclass such as :class:`pyramid.httpexceptions.HTTPFound`. See |
|
30 |
:ref:`webob_chapter` for information about response objects. |
878328
|
31 |
|
1f901a
|
32 |
response adapter |
CM |
33 |
A callable which accepts an arbitrary object and "converts" it to a |
|
34 |
:class:`pyramid.response.Response` object. See :ref:`using_iresponse` |
|
35 |
for more information. |
|
36 |
|
878328
|
37 |
Repoze |
7e7fc9
|
38 |
"Repoze" is essentially a "brand" of software developed by `Agendaless |
1cb30e
|
39 |
Consulting <https://agendaless.com>`_ and a set of contributors. The |
7e7fc9
|
40 |
term has no special intrinsic meaning. The project's `website |
CM |
41 |
<http://repoze.org>`_ has more information. The software developed |
|
42 |
"under the brand" is available in a `Subversion repository |
|
43 |
<http://svn.repoze.org>`_. Pyramid was originally known as |
|
44 |
:mod:`repoze.bfg`. |
878328
|
45 |
|
8c56ae
|
46 |
setuptools |
878328
|
47 |
`Setuptools <http://peak.telecommunity.com/DevCenter/setuptools>`_ |
CM |
48 |
builds on Python's ``distutils`` to provide easier building, |
eab66f
|
49 |
distribution, and installation of libraries and applications. As of |
CM |
50 |
this writing, setuptools runs under Python 2, but not under Python 3. |
|
51 |
You can use :term:`distribute` under Python 3 instead. |
|
52 |
|
|
53 |
distribute |
1cb30e
|
54 |
`Distribute <https://pythonhosted.org/distribute/>`_ is a fork of |
eab66f
|
55 |
:term:`setuptools` which runs on both Python 2 and Python 3. |
878328
|
56 |
|
CM |
57 |
pkg_resources |
eab66f
|
58 |
A module which ships with :term:`setuptools` and :term:`distribute` that |
CM |
59 |
provides an API for addressing "asset files" within a Python |
|
60 |
:term:`package`. Asset files are static files, template files, etc; |
|
61 |
basically anything non-Python-source that lives in a Python package can |
2033ee
|
62 |
be considered a asset file. |
SP |
63 |
|
|
64 |
.. seealso:: |
|
65 |
|
|
66 |
See also `PkgResources |
|
67 |
<http://peak.telecommunity.com/DevCenter/PkgResources>`_. |
878328
|
68 |
|
3e2f12
|
69 |
asset |
878328
|
70 |
Any file contained within a Python :term:`package` which is *not* |
CM |
71 |
a Python source code file. |
|
72 |
|
3e2f12
|
73 |
asset specification |
a5ffd6
|
74 |
A colon-delimited identifier for an :term:`asset`. The colon |
878328
|
75 |
separates a Python :term:`package` name from a package subpath. |
3e2f12
|
76 |
For example, the asset specification |
878328
|
77 |
``my.package:static/baz.css`` identifies the file named |
CM |
78 |
``baz.css`` in the ``static`` subdirectory of the ``my.package`` |
2e3f70
|
79 |
Python :term:`package`. See :ref:`asset_specifications` for more |
b33ae9
|
80 |
info. |
878328
|
81 |
|
8c56ae
|
82 |
package |
878328
|
83 |
A directory on disk which contains an ``__init__.py`` file, making |
CM |
84 |
it recognizable to Python as a location which can be ``import`` -ed. |
cdac6d
|
85 |
A package exists to contain :term:`module` files. |
878328
|
86 |
|
798aad
|
87 |
module |
CM |
88 |
A Python source file; a file on the filesystem that typically ends with |
2e3f70
|
89 |
the extension ``.py`` or ``.pyc``. Modules often live in a |
798aad
|
90 |
:term:`package`. |
CM |
91 |
|
8c56ae
|
92 |
project |
878328
|
93 |
(Setuptools/distutils terminology). A directory on disk which |
CM |
94 |
contains a ``setup.py`` file and one or more Python packages. The |
|
95 |
``setup.py`` file contains code that allows the package(s) to be |
|
96 |
installed, distributed, and tested. |
|
97 |
|
8c56ae
|
98 |
distribution |
878328
|
99 |
(Setuptools/distutils terminology). A file representing an |
CM |
100 |
installable library or application. Distributions are usually |
|
101 |
files that have the suffix of ``.egg``, ``.tar.gz``, or ``.zip``. |
eab66f
|
102 |
Distributions are the target of Setuptools-related commands such as |
878328
|
103 |
``easy_install``. |
CM |
104 |
|
8c56ae
|
105 |
entry point |
878328
|
106 |
A :term:`setuptools` indirection, defined within a setuptools |
CM |
107 |
:term:`distribution` setup.py. It is usually a name which refers |
|
108 |
to a function somewhere in a package which is held by the |
|
109 |
distribution. |
|
110 |
|
8c56ae
|
111 |
dotted Python name |
878328
|
112 |
A reference to a Python object by name using a string, in the form |
f8869c
|
113 |
``path.to.modulename:attributename``. Often used in Pyramid and |
c9c3c4
|
114 |
setuptools configurations. A variant is used in dotted names within |
CM |
115 |
configurator method arguments that name objects (such as the "add_view" |
|
116 |
method's "view" and "context" attributes): the colon (``:``) is not |
878328
|
117 |
used; in its place is a dot. |
CM |
118 |
|
8c56ae
|
119 |
view |
878328
|
120 |
Common vernacular for a :term:`view callable`. |
CM |
121 |
|
8c56ae
|
122 |
view callable |
878328
|
123 |
A "view callable" is a callable Python object which is associated |
CM |
124 |
with a :term:`view configuration`; it returns a :term:`response` |
|
125 |
object . A view callable accepts a single argument: ``request``, |
|
126 |
which will be an instance of a :term:`request` object. An |
|
127 |
alternate calling convention allows a view to be defined as a |
|
128 |
callable which accepts a pair of arguments: ``context`` and |
197f0c
|
129 |
``request``: this calling convention is useful for |
CM |
130 |
traversal-based applications in which a :term:`context` is always |
|
131 |
very important. A view callable is the primary mechanism by |
|
132 |
which a developer writes user interface code within |
fd5ae9
|
133 |
:app:`Pyramid`. See :ref:`views_chapter` for more information |
CM |
134 |
about :app:`Pyramid` view callables. |
878328
|
135 |
|
8c56ae
|
136 |
view configuration |
f7f0dd
|
137 |
View configuration is the act of associating a :term:`view callable` |
CM |
138 |
with configuration information. This configuration information helps |
|
139 |
map a given :term:`request` to a particular view callable and it can |
|
140 |
influence the response of a view callable. :app:`Pyramid` views can be |
c9c3c4
|
141 |
configured via :term:`imperative configuration`, or by a special |
CM |
142 |
``@view_config`` decorator coupled with a :term:`scan`. See |
f7f0dd
|
143 |
:ref:`view_config_chapter` for more information about view |
CM |
144 |
configuration. |
878328
|
145 |
|
8c56ae
|
146 |
view name |
878328
|
147 |
The "URL name" of a view, e.g ``index.html``. If a view is |
CM |
148 |
configured without a name, its name is considered to be the empty |
|
149 |
string (which implies the :term:`default view`). |
|
150 |
|
|
151 |
Default view |
a5ffd6
|
152 |
The default view of a :term:`resource` is the view invoked when the |
CM |
153 |
:term:`view name` is the empty string (``''``). This is the case when |
|
154 |
:term:`traversal` exhausts the path elements in the PATH_INFO of a |
780999
|
155 |
request before it returns a :term:`context` resource. |
878328
|
156 |
|
8c56ae
|
157 |
virtualenv |
d67566
|
158 |
The `virtualenv tool <https://virtualenv.pypa.io/en/latest/>`_ that allows |
SP |
159 |
one to create virtual environments. In Python 3.3 and greater, |
|
160 |
:term:`venv` is the preferred tool. |
878328
|
161 |
|
f73f0e
|
162 |
Note: whenever you encounter commands prefixed with ``$VENV`` (Unix) |
TL |
163 |
or ``%VENV`` (Windows), know that that is the environment variable whose |
|
164 |
value is the root of the virtual environment in question. |
|
165 |
|
3e2f12
|
166 |
resource |
a5ffd6
|
167 |
An object representing a node in the :term:`resource tree` of an |
125ea4
|
168 |
application. If :term:`traversal` is used, a resource is an element in |
a5ffd6
|
169 |
the resource tree traversed by the system. When traversal is used, a |
125ea4
|
170 |
resource becomes the :term:`context` of a :term:`view`. If :term:`url |
a5ffd6
|
171 |
dispatch` is used, a single resource is generated for each request and |
780999
|
172 |
is used as the context resource of a view. |
a5ffd6
|
173 |
|
CM |
174 |
resource tree |
|
175 |
A nested set of dictionary-like objects, each of which is a |
|
176 |
:term:`resource`. The act of :term:`traversal` uses the resource tree |
780999
|
177 |
to find a :term:`context` resource. |
a5ffd6
|
178 |
|
CM |
179 |
domain model |
|
180 |
Persistent data related to your application. For example, data stored |
|
181 |
in a relational database. In some applications, the :term:`resource |
|
182 |
tree` acts as the domain model. |
878328
|
183 |
|
8c56ae
|
184 |
traversal |
3e2f12
|
185 |
The act of descending "up" a tree of resource objects from a root |
780999
|
186 |
resource in order to find a :term:`context` resource. The |
CM |
187 |
:app:`Pyramid` :term:`router` performs traversal of resource objects |
|
188 |
when a :term:`root factory` is specified. See the |
|
189 |
:ref:`traversal_chapter` chapter for more information. Traversal can be |
|
190 |
performed *instead* of :term:`URL dispatch` or can be combined *with* |
|
191 |
URL dispatch. See :ref:`hybrid_chapter` for more information about |
|
192 |
combining traversal and URL dispatch (advanced). |
878328
|
193 |
|
8c56ae
|
194 |
router |
878328
|
195 |
The :term:`WSGI` application created when you start a |
fd5ae9
|
196 |
:app:`Pyramid` application. The router intercepts requests, |
878328
|
197 |
invokes traversal and/or URL dispatch, calls view functions, and |
CM |
198 |
returns responses to the WSGI server on behalf of your |
fd5ae9
|
199 |
:app:`Pyramid` application. |
878328
|
200 |
|
CM |
201 |
URL dispatch |
3e2f12
|
202 |
An alternative to :term:`traversal` as a mechanism for locating a |
780999
|
203 |
:term:`context` resource for a :term:`view`. When you use a |
CM |
204 |
:term:`route` in your :app:`Pyramid` application via a :term:`route |
878328
|
205 |
configuration`, you are using URL dispatch. See the |
CM |
206 |
:ref:`urldispatch_chapter` for more information. |
|
207 |
|
8c56ae
|
208 |
context |
a42a1e
|
209 |
A resource in the resource tree that is found during :term:`traversal` |
780999
|
210 |
or :term:`URL dispatch` based on URL data; if it's found via traversal, |
3e2f12
|
211 |
it's usually a :term:`resource` object that is part of a resource tree; |
a42a1e
|
212 |
if it's found via :term:`URL dispatch`, it's an object manufactured on |
780999
|
213 |
behalf of the route's "factory". A context resource becomes the subject |
CM |
214 |
of a :term:`view`, and often has security information attached to |
|
215 |
it. See the :ref:`traversal_chapter` chapter and the |
3e2f12
|
216 |
:ref:`urldispatch_chapter` chapter for more information about how a URL |
780999
|
217 |
is resolved to a context resource. |
878328
|
218 |
|
8c56ae
|
219 |
application registry |
878328
|
220 |
A registry of configuration information consulted by |
fd5ae9
|
221 |
:app:`Pyramid` while servicing an application. An application |
3e2f12
|
222 |
registry maps resource types to views, as well as housing other |
878328
|
223 |
application-specific component registrations. Every |
fd5ae9
|
224 |
:app:`Pyramid` application has one (and only one) application |
878328
|
225 |
registry. |
CM |
226 |
|
8c56ae
|
227 |
template |
878328
|
228 |
A file with replaceable parts that is capable of representing some |
CM |
229 |
text, XML, or HTML when rendered. |
|
230 |
|
8c56ae
|
231 |
location |
a5ffd6
|
232 |
The path to an object in a :term:`resource tree`. See |
CM |
233 |
:ref:`location_aware` for more information about how to make a resource |
|
234 |
object *location-aware*. |
878328
|
235 |
|
8c56ae
|
236 |
permission |
1cb110
|
237 |
A string or Unicode object that represents an action being taken against |
780999
|
238 |
a :term:`context` resource. A permission is associated with a view name |
CM |
239 |
and a resource type by the developer. Resources are decorated with |
|
240 |
security declarations (e.g. an :term:`ACL`), which reference these |
2e3f70
|
241 |
tokens also. Permissions are used by the active security policy to |
780999
|
242 |
match the view permission against the resources's statements about which |
2e3f70
|
243 |
permissions are granted to which principal in a context in order to |
780999
|
244 |
answer the question "is this user allowed to do this". Examples of |
CM |
245 |
permissions: ``read``, or ``view_blog_entries``. |
878328
|
246 |
|
a62cc2
|
247 |
default permission |
CM |
248 |
A :term:`permission` which is registered as the default for an |
|
249 |
entire application. When a default permission is in effect, |
|
250 |
every :term:`view configuration` registered with the system will |
|
251 |
be effectively amended with a ``permission`` argument that will |
|
252 |
require that the executing user possess the default permission in |
|
253 |
order to successfully execute the associated :term:`view |
2033ee
|
254 |
callable`. |
SP |
255 |
|
|
256 |
.. seealso:: |
|
257 |
|
|
258 |
See also :ref:`setting_a_default_permission`. |
a62cc2
|
259 |
|
878328
|
260 |
ACE |
CM |
261 |
An *access control entry*. An access control entry is one element |
|
262 |
in an :term:`ACL`. An access control entry is a three-tuple that |
|
263 |
describes three things: an *action* (one of either ``Allow`` or |
|
264 |
``Deny``), a :term:`principal` (a string describing a user or |
|
265 |
group), and a :term:`permission`. For example the ACE, ``(Allow, |
|
266 |
'bob', 'read')`` is a member of an ACL that indicates that the |
|
267 |
principal ``bob`` is allowed the permission ``read`` against the |
780999
|
268 |
resource the ACL is attached to. |
878328
|
269 |
|
CM |
270 |
ACL |
780999
|
271 |
An *access control list*. An ACL is a sequence of :term:`ACE` tuples. |
CM |
272 |
An ACL is attached to a resource instance. An example of an ACL is ``[ |
|
273 |
(Allow, 'bob', 'read'), (Deny, 'fred', 'write')]``. If an ACL is |
|
274 |
attached to a resource instance, and that resource is findable via the |
|
275 |
context resource, it will be consulted any active security policy to |
b7057f
|
276 |
determine whether a particular request can be fulfilled given the |
780999
|
277 |
:term:`authentication` information in the request. |
878328
|
278 |
|
8c56ae
|
279 |
authentication |
c5f24b
|
280 |
The act of determining that the credentials a user presents |
CM |
281 |
during a particular request are "good". Authentication in |
fd5ae9
|
282 |
:app:`Pyramid` is performed via an :term:`authentication |
878328
|
283 |
policy`. |
CM |
284 |
|
8c56ae
|
285 |
authorization |
780999
|
286 |
The act of determining whether a user can perform a specific action. In |
CM |
287 |
pyramid terms, this means determining whether, for a given resource, any |
|
288 |
:term:`principal` (or principals) associated with the request have the |
|
289 |
requisite :term:`permission` to allow the request to continue. |
|
290 |
Authorization in :app:`Pyramid` is performed via its |
|
291 |
:term:`authorization policy`. |
878328
|
292 |
|
8c56ae
|
293 |
principal |
1cb110
|
294 |
A *principal* is a string or Unicode object representing an entity, |
SP |
295 |
typically a user or group. Principals are provided by an |
|
296 |
:term:`authentication policy`. For example, if a user has the |
|
297 |
:term:`userid` `bob`, and is a member of two groups named `group foo` and |
|
298 |
`group bar`, then the request might have information attached to it |
|
299 |
indicating that Bob was represented by three principals: `bob`, `group |
|
300 |
foo` and `group bar`. |
5cf183
|
301 |
|
KOP |
302 |
userid |
1cb110
|
303 |
A *userid* is a string or Unicode object used to identify and authenticate |
SP |
304 |
a real-world user or client. A userid is supplied to an |
|
305 |
:term:`authentication policy` in order to discover the user's |
|
306 |
:term:`principals <principal>`. In the authentication policies which |
|
307 |
:app:`Pyramid` provides, the default behavior returns the user's userid as |
|
308 |
a principal, but this is not strictly necessary in custom policies that |
|
309 |
define their principals differently. |
878328
|
310 |
|
8c56ae
|
311 |
authorization policy |
fd5ae9
|
312 |
An authorization policy in :app:`Pyramid` terms is a bit of |
878328
|
313 |
code which has an API which determines whether or not the |
CM |
314 |
principals associated with the request can perform an action |
|
315 |
associated with a permission, based on the information found on the |
780999
|
316 |
:term:`context` resource. |
878328
|
317 |
|
8c56ae
|
318 |
authentication policy |
fd5ae9
|
319 |
An authentication policy in :app:`Pyramid` terms is a bit of |
878328
|
320 |
code which has an API which determines the current |
CM |
321 |
:term:`principal` (or principals) associated with a request. |
|
322 |
|
|
323 |
WSGI |
1cb30e
|
324 |
`Web Server Gateway Interface <http://wsgi.readthedocs.org/en/latest/>`_. |
SP |
325 |
This is a Python standard for connecting web applications to web servers, |
|
326 |
similar to the concept of Java Servlets. :app:`Pyramid` requires that |
|
327 |
your application be served as a WSGI application. |
878328
|
328 |
|
8c56ae
|
329 |
middleware |
878328
|
330 |
*Middleware* is a :term:`WSGI` concept. It is a WSGI component |
CM |
331 |
that acts both as a server and an application. Interesting uses |
|
332 |
for middleware exist, such as caching, content-transport |
62ab0f
|
333 |
encoding, and other functions. See `WSGI documentation |
1cb30e
|
334 |
<http://wsgi.readthedocs.org/en/latest/>`_ or `PyPI |
62ab0f
|
335 |
<https://pypi.org/>`_ to find middleware for your application. |
878328
|
336 |
|
8c56ae
|
337 |
pipeline |
f8869c
|
338 |
The :term:`PasteDeploy` term for a single configuration of a WSGI |
37607c
|
339 |
server, a WSGI application, with a set of :term:`middleware` in-between. |
878328
|
340 |
|
CM |
341 |
Zope |
|
342 |
`The Z Object Publishing Framework <http://zope.org>`_, a |
|
343 |
full-featured Python web framework. |
|
344 |
|
|
345 |
Grok |
|
346 |
`A web framework based on Zope 3 <http://grok.zope.org>`_. |
|
347 |
|
|
348 |
Django |
1cb30e
|
349 |
`A full-featured Python web framework <https://www.djangoproject.com/>`_. |
878328
|
350 |
|
CM |
351 |
Pylons |
1c561a
|
352 |
`A lightweight Python web framework <https://docs.pylonsproject.org/projects/pylons-webframework/en/latest/>`_ |
44b651
|
353 |
and a predecessor of Pyramid. |
878328
|
354 |
|
CM |
355 |
ZODB |
1cb30e
|
356 |
`Zope Object Database <http://www.zodb.org/en/latest/>`_, a persistent |
SP |
357 |
Python object store. |
878328
|
358 |
|
CM |
359 |
WebOb |
e005c2
|
360 |
`WebOb <http://webob.org>`_ is a WSGI request/response |
878328
|
361 |
library created by Ian Bicking. |
CM |
362 |
|
|
363 |
PasteDeploy |
dd31f0
|
364 |
`PasteDeploy <https://pastedeploy.readthedocs.io/en/latest/>`_ is a library used by |
fd5ae9
|
365 |
:app:`Pyramid` which makes it possible to configure |
878328
|
366 |
:term:`WSGI` components together declaratively within an ``.ini`` |
f8869c
|
367 |
file. It was developed by Ian Bicking. |
878328
|
368 |
|
CM |
369 |
Chameleon |
8d212a
|
370 |
`chameleon <https://chameleon.readthedocs.org/en/latest/>`_ is an |
SP |
371 |
attribute language template compiler which supports the :term:`ZPT` |
|
372 |
templating specification. It is written and maintained by Malthe Borch. It |
|
373 |
has several extensions, such as the ability to use bracketed (Mako-style) |
|
374 |
``${name}`` syntax. It is also much faster than the reference |
|
375 |
implementation of ZPT. :app:`Pyramid` offers Chameleon templating out of |
|
376 |
the box in ZPT and text flavors. |
878328
|
377 |
|
CM |
378 |
ZPT |
1cb30e
|
379 |
The `Zope Page Template <http://docs.zope.org/zope2/zope2book/ZPT.html>`_ |
878328
|
380 |
templating language. |
CM |
381 |
|
|
382 |
METAL |
1cb30e
|
383 |
`Macro Expansion for TAL |
SP |
384 |
<http://docs.zope.org/zope2/zope2book/AppendixC.html#metal-overview>`_, a |
|
385 |
part of :term:`ZPT` which makes it possible to share common look and feel |
|
386 |
between templates. |
878328
|
387 |
|
CM |
388 |
Genshi |
62ab0f
|
389 |
An `XML templating language <https://pypi.org/project/Genshi/>`_ |
878328
|
390 |
by Christopher Lenz. |
CM |
391 |
|
|
392 |
Jinja2 |
1cb30e
|
393 |
A `text templating language <http://jinja.pocoo.org/>`_ by Armin Ronacher. |
878328
|
394 |
|
CM |
395 |
Routes |
1cb30e
|
396 |
A `system by Ben Bangert <http://routes.readthedocs.org/en/latest/>`_ |
SP |
397 |
which parses URLs and compares them against a number of user defined |
|
398 |
mappings. The URL pattern matching syntax in :app:`Pyramid` is inspired by |
|
399 |
the Routes syntax (which was inspired by Ruby On Rails pattern syntax). |
878328
|
400 |
|
8c56ae
|
401 |
route |
878328
|
402 |
A single pattern matched by the :term:`url dispatch` subsystem, |
CM |
403 |
which generally resolves to a :term:`root factory` (and then |
2033ee
|
404 |
ultimately a :term:`view`). |
SP |
405 |
|
|
406 |
.. seealso:: |
|
407 |
|
|
408 |
See also :term:`url dispatch`. |
878328
|
409 |
|
8c56ae
|
410 |
route configuration |
c9c3c4
|
411 |
Route configuration is the act of associating request parameters with a |
CM |
412 |
particular :term:`route` using pattern matching and :term:`route |
|
413 |
predicate` statements. See :ref:`urldispatch_chapter` for more |
|
414 |
information about route configuration. |
878328
|
415 |
|
CM |
416 |
Zope Component Architecture |
|
417 |
The `Zope Component Architecture |
1cb30e
|
418 |
<http://muthukadan.net/docs/zca.html>`_ (aka ZCA) is a system |
878328
|
419 |
which allows for application pluggability and complex dispatching |
CM |
420 |
based on objects which implement an :term:`interface`. |
fd5ae9
|
421 |
:app:`Pyramid` uses the ZCA "under the hood" to perform view |
878328
|
422 |
dispatching and other application configuration tasks. |
CM |
423 |
|
8c56ae
|
424 |
reStructuredText |
44c64f
|
425 |
A `plain text markup format <http://docutils.sourceforge.net/rst.html>`_ |
TL |
426 |
that is the defacto standard for documenting Python projects. |
|
427 |
The Pyramid documentation is written in reStructuredText. |
878328
|
428 |
|
8c56ae
|
429 |
root |
780999
|
430 |
The object at which :term:`traversal` begins when :app:`Pyramid` |
CM |
431 |
searches for a :term:`context` resource (for :term:`URL Dispatch`, the |
2e3f70
|
432 |
root is *always* the context resource unless the ``traverse=`` argument |
780999
|
433 |
is used in route configuration). |
878328
|
434 |
|
8c56ae
|
435 |
subpath |
878328
|
436 |
A list of element "left over" after the :term:`router` has |
CM |
437 |
performed a successful traversal to a view. The subpath is a |
|
438 |
sequence of strings, e.g. ``['left', 'over', 'names']``. Within |
edd915
|
439 |
Pyramid applications that use URL dispatch rather than traversal, you |
878328
|
440 |
can use ``*subpath`` in the route pattern to influence the |
CM |
441 |
subpath. See :ref:`star_subpath` for more information. |
|
442 |
|
8c56ae
|
443 |
interface |
62ab0f
|
444 |
A `Zope interface <https://pypi.org/project/zope.interface/>`_ |
fd5ae9
|
445 |
object. In :app:`Pyramid`, an interface may be attached to a |
3e2f12
|
446 |
:term:`resource` object or a :term:`request` object in order to |
878328
|
447 |
identify that the object is "of a type". Interfaces are used |
fd5ae9
|
448 |
internally by :app:`Pyramid` to perform view lookups and other |
878328
|
449 |
policy lookups. The ability to make use of an interface is |
CM |
450 |
exposed to an application programmers during :term:`view |
eecdbc
|
451 |
configuration` via the ``context`` argument, the ``request_type`` |
878328
|
452 |
argument and the ``containment`` argument. Interfaces are also |
CM |
453 |
exposed to application developers when they make use of the |
fd5ae9
|
454 |
:term:`event` system. Fundamentally, :app:`Pyramid` |
eecdbc
|
455 |
programmers can think of an interface as something that they can |
CM |
456 |
attach to an object that stamps it with a "type" unrelated to its |
|
457 |
underlying Python type. Interfaces can also be used to describe |
|
458 |
the behavior of an object (its methods and attributes), but |
fd5ae9
|
459 |
unless they choose to, :app:`Pyramid` programmers do not need |
eecdbc
|
460 |
to understand or use this feature of interfaces. |
878328
|
461 |
|
8c56ae
|
462 |
event |
878328
|
463 |
An object broadcast to zero or more :term:`subscriber` callables |
fd5ae9
|
464 |
during normal :app:`Pyramid` system operations during the |
878328
|
465 |
lifetime of an application. Application code can subscribe to |
CM |
466 |
these events by using the subscriber functionality described in |
|
467 |
:ref:`events_chapter`. |
|
468 |
|
8c56ae
|
469 |
subscriber |
878328
|
470 |
A callable which receives an :term:`event`. A callable becomes a |
c9c3c4
|
471 |
subscriber via :term:`imperative configuration` or via |
CM |
472 |
:term:`configuration decoration`. See :ref:`events_chapter` for more |
|
473 |
information. |
878328
|
474 |
|
8c56ae
|
475 |
request type |
878328
|
476 |
An attribute of a :term:`request` that allows for specialization |
CM |
477 |
of view invocation based on arbitrary categorization. The every |
fd5ae9
|
478 |
:term:`request` object that :app:`Pyramid` generates and |
878328
|
479 |
manipulates has one or more :term:`interface` objects attached to |
CM |
480 |
it. The default interface attached to a request object is |
050868
|
481 |
:class:`pyramid.interfaces.IRequest`. |
878328
|
482 |
|
CM |
483 |
repoze.lemonade |
|
484 |
Zope2 CMF-like `data structures and helper facilities |
|
485 |
<http://docs.repoze.org/lemonade>`_ for CA-and-ZODB-based |
fd5ae9
|
486 |
applications useful within :app:`Pyramid` applications. |
878328
|
487 |
|
CM |
488 |
repoze.catalog |
|
489 |
An indexing and search facility (fielded and full-text) based on |
62ab0f
|
490 |
`zope.index <https://pypi.org/project/zope.index/>`_. See `the |
878328
|
491 |
documentation <http://docs.repoze.org/catalog>`_ for more |
3e4f42
|
492 |
information. |
878328
|
493 |
|
CM |
494 |
repoze.who |
1cb30e
|
495 |
`Authentication middleware <http://repozewho.readthedocs.org/en/latest/>`_ |
SP |
496 |
for :term:`WSGI` applications. It can be used by :app:`Pyramid` to |
878328
|
497 |
provide authentication information. |
CM |
498 |
|
|
499 |
repoze.workflow |
|
500 |
`Barebones workflow for Python apps |
|
501 |
<http://docs.repoze.org/workflow>`_ . It can be used by |
fd5ae9
|
502 |
:app:`Pyramid` to form a workflow system. |
878328
|
503 |
|
8c56ae
|
504 |
virtual root |
c25a8f
|
505 |
A resource object representing the "virtual" root of a request; this is |
CM |
506 |
typically the :term:`physical root` object unless :ref:`vhosting_chapter` |
|
507 |
is in use. |
|
508 |
|
|
509 |
physical root |
043ccd
|
510 |
The object returned by the application :term:`root factory`. |
TL |
511 |
Unlike the :term:`virtual root` of a request, it is not impacted by |
c25a8f
|
512 |
:ref:`vhosting_chapter`: it will always be the actual object returned by |
CM |
513 |
the root factory, never a subobject. |
|
514 |
|
|
515 |
physical path |
|
516 |
The path required by a traversal which resolve a :term:`resource` starting |
|
517 |
from the :term:`physical root`. For example, the physical path of the |
|
518 |
``abc`` subobject of the physical root object is ``/abc``. Physical paths |
|
519 |
can also be specified as tuples where the first element is the empty |
|
520 |
string (representing the root), and every other element is a Unicode |
|
521 |
object, e.g. ``('', 'abc')``. Physical paths are also sometimes called |
|
522 |
"traversal paths". |
878328
|
523 |
|
8c56ae
|
524 |
lineage |
780999
|
525 |
An ordered sequence of objects based on a ":term:`location` -aware" |
CM |
526 |
resource. The lineage of any given :term:`resource` is composed of |
|
527 |
itself, its parent, its parent's parent, and so on. The order of the |
|
528 |
sequence is resource-first, then the parent of the resource, then its |
|
529 |
parent's parent, and so on. The parent of a resource in a lineage is |
|
530 |
available as its ``__parent__`` attribute. |
878328
|
531 |
|
8c56ae
|
532 |
root factory |
96188a
|
533 |
The "root factory" of a :app:`Pyramid` application is called on every |
CM |
534 |
request sent to the application. The root factory returns the traversal |
|
535 |
root of an application. It is conventionally named ``get_root``. An |
|
536 |
application may supply a root factory to :app:`Pyramid` during the |
|
537 |
construction of a :term:`Configurator`. If a root factory is not |
|
538 |
supplied, the application creates a default root object using the |
|
539 |
:term:`default root factory`. |
|
540 |
|
|
541 |
default root factory |
|
542 |
If an application does not register a :term:`root factory` at Pyramid |
|
543 |
configuration time, a *default* root factory is used to created the |
|
544 |
default root object. Use of the default root object is useful in |
|
545 |
application which use :term:`URL dispatch` for all URL-to-view code |
|
546 |
mappings, and does not (knowingly) use traversal otherwise. |
878328
|
547 |
|
CM |
548 |
SQLAlchemy |
7e7fc9
|
549 |
`SQLAlchemy <http://www.sqlalchemy.org/>`_ is an object |
878328
|
550 |
relational mapper used in tutorials within this documentation. |
CM |
551 |
|
|
552 |
JSON |
|
553 |
`JavaScript Object Notation <http://www.json.org/>`_ is a data |
|
554 |
serialization format. |
|
555 |
|
6a0602
|
556 |
jQuery |
1cb30e
|
557 |
A popular `Javascript library <https://jquery.org>`_. |
6a0602
|
558 |
|
8c56ae
|
559 |
renderer |
94bad2
|
560 |
A serializer which converts non-:term:`Response` return values from a |
SP |
561 |
:term:`view` into a string, and ultimately into a response, usually |
|
562 |
through :term:`view configuration`. Using a renderer can make writing |
|
563 |
views that require templating or other serialization, like JSON, less |
|
564 |
tedious. See :ref:`views_which_use_a_renderer` for more information. |
878328
|
565 |
|
410457
|
566 |
renderer factory |
CM |
567 |
A factory which creates a :term:`renderer`. See |
|
568 |
:ref:`adding_and_overriding_renderers` for more information. |
|
569 |
|
878328
|
570 |
mod_wsgi |
3d4023
|
571 |
`mod_wsgi <https://modwsgi.readthedocs.io>`_ is an Apache |
1cb30e
|
572 |
module developed by Graham Dumpleton. It allows :term:`WSGI` applications |
SP |
573 |
(such as applications developed using :app:`Pyramid`) to be served using |
|
574 |
the Apache web server. |
878328
|
575 |
|
8c56ae
|
576 |
view predicate |
878328
|
577 |
An argument to a :term:`view configuration` which evaluates to |
CM |
578 |
``True`` or ``False`` for a given :term:`request`. All predicates |
|
579 |
attached to a view configuration must evaluate to true for the |
|
580 |
associated view to be considered as a possible callable for a |
|
581 |
given request. |
|
582 |
|
8c56ae
|
583 |
route predicate |
878328
|
584 |
An argument to a :term:`route configuration` which implies a value |
CM |
585 |
that evaluates to ``True`` or ``False`` for a given |
|
586 |
:term:`request`. All predicates attached to a :term:`route |
|
587 |
configuration` must evaluate to ``True`` for the associated route |
|
588 |
to "match" the current request. If a route does not match the |
|
589 |
current request, the next route (in definition order) is |
|
590 |
attempted. |
|
591 |
|
49eccc
|
592 |
routes mapper |
CM |
593 |
An object which compares path information from a request to an |
|
594 |
ordered set of route patterns. See :ref:`urldispatch_chapter`. |
|
595 |
|
8c56ae
|
596 |
predicate |
878328
|
597 |
A test which returns ``True`` or ``False``. Two different types |
fd5ae9
|
598 |
of predicates exist in :app:`Pyramid`: a :term:`view predicate` |
878328
|
599 |
and a :term:`route predicate`. View predicates are attached to |
CM |
600 |
:term:`view configuration` and route predicates are attached to |
|
601 |
:term:`route configuration`. |
|
602 |
|
8c56ae
|
603 |
decorator |
878328
|
604 |
A wrapper around a Python function or class which accepts the |
CM |
605 |
function or class as its first argument and which returns an |
fd5ae9
|
606 |
arbitrary object. :app:`Pyramid` provides several decorators, |
2033ee
|
607 |
used for configuration and return value modification purposes. |
SP |
608 |
|
|
609 |
.. seealso:: |
|
610 |
|
1cb30e
|
611 |
See also `PEP 318 <https://www.python.org/dev/peps/pep-0318/>`_. |
878328
|
612 |
|
8c56ae
|
613 |
configuration declaration |
c4503b
|
614 |
An individual method call made to a :term:`configuration directive`, |
CM |
615 |
such as registering a :term:`view configuration` (via the |
050868
|
616 |
:meth:`~pyramid.config.Configurator.add_view` method of the |
CM |
617 |
configurator) or :term:`route configuration` (via the |
|
618 |
:meth:`~pyramid.config.Configurator.add_route` method of the |
|
619 |
configurator). A set of configuration declarations is also implied by |
|
620 |
the :term:`configuration decoration` detected by a :term:`scan` of code |
|
621 |
in a package. |
878328
|
622 |
|
8c56ae
|
623 |
configuration decoration |
878328
|
624 |
Metadata implying one or more :term:`configuration declaration` |
CM |
625 |
invocations. Often set by configuration Python :term:`decorator` |
197f0c
|
626 |
attributes, such as :class:`pyramid.view.view_config`, aka |
CM |
627 |
``@view_config``. |
878328
|
628 |
|
8c56ae
|
629 |
scan |
fd5ae9
|
630 |
The term used by :app:`Pyramid` to define the process of |
878328
|
631 |
importing and examining all code in a Python package or module for |
CM |
632 |
:term:`configuration decoration`. |
|
633 |
|
8c56ae
|
634 |
configurator |
878328
|
635 |
An object used to do :term:`configuration declaration` within an |
CM |
636 |
application. The most common configurator is an instance of the |
050868
|
637 |
:class:`pyramid.config.Configurator` class. |
878328
|
638 |
|
8c56ae
|
639 |
imperative configuration |
878328
|
640 |
The configuration mode in which you use Python to call methods on |
CM |
641 |
a :term:`Configurator` in order to add each :term:`configuration |
|
642 |
declaration` required by your application. |
|
643 |
|
8c56ae
|
644 |
declarative configuration |
4e1199
|
645 |
The configuration mode in which you use the combination of |
3cf66a
|
646 |
:term:`configuration decoration` and a :term:`scan` to configure your |
CM |
647 |
Pyramid application. |
878328
|
648 |
|
2f4bde
|
649 |
Not Found View |
050868
|
650 |
An :term:`exception view` invoked by :app:`Pyramid` when the developer |
CM |
651 |
explicitly raises a :class:`pyramid.httpexceptions.HTTPNotFound` |
|
652 |
exception from within :term:`view` code or :term:`root factory` code, |
|
653 |
or when the current request doesn't match any :term:`view |
|
654 |
configuration`. :app:`Pyramid` provides a default implementation of a |
2f4bde
|
655 |
Not Found View; it can be overridden. See |
878328
|
656 |
:ref:`changing_the_notfound_view`. |
CM |
657 |
|
8c56ae
|
658 |
Forbidden view |
050868
|
659 |
An :term:`exception view` invoked by :app:`Pyramid` when the developer |
CM |
660 |
explicitly raises a :class:`pyramid.httpexceptions.HTTPForbidden` |
|
661 |
exception from within :term:`view` code or :term:`root factory` code, |
|
662 |
or when the :term:`view configuration` and :term:`authorization policy` |
239a93
|
663 |
found for a request disallows a particular view invocation. |
050868
|
664 |
:app:`Pyramid` provides a default implementation of a forbidden view; |
CM |
665 |
it can be overridden. See :ref:`changing_the_forbidden_view`. |
878328
|
666 |
|
239a93
|
667 |
Exception view |
CM |
668 |
An exception view is a :term:`view callable` which may be |
fd5ae9
|
669 |
invoked by :app:`Pyramid` when an exception is raised during |
239a93
|
670 |
request processing. See :ref:`exception_views` for more |
CM |
671 |
information. |
|
672 |
|
1ffb8e
|
673 |
HTTP Exception |
CM |
674 |
The set of exception classes defined in :mod:`pyramid.httpexceptions`. |
|
675 |
These can be used to generate responses with various status codes when |
2033ee
|
676 |
raised or returned from a :term:`view callable`. |
SP |
677 |
|
|
678 |
.. seealso:: |
|
679 |
|
|
680 |
See also :ref:`http_exceptions`. |
878328
|
681 |
|
CM |
682 |
thread local |
7e7fc9
|
683 |
A thread-local variable is one which is essentially a global variable |
CM |
684 |
in terms of how it is accessed and treated, however, each `thread |
1cb30e
|
685 |
<https://en.wikipedia.org/wiki/Thread_(computer_science)>`_ used by the |
7e7fc9
|
686 |
application may have a different value for this same "global" variable. |
CM |
687 |
:app:`Pyramid` uses a small number of thread local variables, as |
eb71e9
|
688 |
described in :ref:`threadlocals_chapter`. |
2033ee
|
689 |
|
SP |
690 |
.. seealso:: |
|
691 |
|
|
692 |
See also the :class:`stdlib documentation <threading.local>` |
|
693 |
for more information. |
e4e3aa
|
694 |
|
8c56ae
|
695 |
multidict |
2a1c3f
|
696 |
An ordered dictionary that can have multiple values for each key. Adds |
CM |
697 |
the methods ``getall``, ``getone``, ``mixed``, ``add`` and |
|
698 |
``dict_of_lists`` to the normal dictionary interface. See |
|
699 |
:ref:`multidict_narr` and :class:`pyramid.interfaces.IMultiDict`. |
e4e3aa
|
700 |
|
125e97
|
701 |
PyPI |
62ab0f
|
702 |
`The Python Package Index <https://pypi.org/>`_, a collection |
1cb30e
|
703 |
of software available for Python. |
e0887e
|
704 |
|
CM |
705 |
Agendaless Consulting |
|
706 |
A consulting organization formed by Paul Everitt, Tres Seaver, |
2033ee
|
707 |
and Chris McDonough. |
SP |
708 |
|
|
709 |
.. seealso:: |
|
710 |
|
1cb30e
|
711 |
See also `Agendaless Consulting <https://agendaless.com>`_. |
9ec2d6
|
712 |
|
CM |
713 |
Jython |
7e7fc9
|
714 |
A `Python implementation <http://www.jython.org/>`_ written for |
9ec2d6
|
715 |
the Java Virtual Machine. |
CM |
716 |
|
|
717 |
Python |
1cb30e
|
718 |
The `programming language <https://www.python.org>`_ in which |
fd5ae9
|
719 |
:app:`Pyramid` is written. |
9ec2d6
|
720 |
|
CM |
721 |
CPython |
|
722 |
The C implementation of the Python language. This is the |
|
723 |
reference implementation that most people refer to as simply |
|
724 |
"Python"; :term:`Jython`, Google's App Engine, and `PyPy |
cff857
|
725 |
<http://doc.pypy.org/en/latest/>`_ are examples of |
9ec2d6
|
726 |
non-C based Python implementations. |
590fe7
|
727 |
|
CM |
728 |
View Lookup |
294929
|
729 |
The act of finding and invoking the "best" :term:`view callable`, |
780999
|
730 |
given a :term:`request` and a :term:`context` resource. |
590fe7
|
731 |
|
780999
|
732 |
Resource Location |
CM |
733 |
The act of locating a :term:`context` resource given a :term:`request`. |
|
734 |
:term:`Traversal` and :term:`URL dispatch` are the resource location |
|
735 |
subsystems used by :app:`Pyramid`. |
590fe7
|
736 |
|
abf62d
|
737 |
Google App Engine |
1cb30e
|
738 |
`Google App Engine <https://cloud.google.com/appengine/>`_ (aka |
abf62d
|
739 |
"GAE") is a Python application hosting service offered by Google. |
fd5ae9
|
740 |
:app:`Pyramid` runs on GAE. |
abf62d
|
741 |
|
e6fa66
|
742 |
Venusian |
452005
|
743 |
:ref:`Venusian` is a library which |
e6fa66
|
744 |
allows framework authors to defer decorator actions. Instead of |
CM |
745 |
taking actions when a function (or class) decorator is executed |
|
746 |
at import time, the action usually taken by the decorator is |
fd5ae9
|
747 |
deferred until a separate "scan" phase. :app:`Pyramid` relies |
e6fa66
|
748 |
on Venusian to provide a basis for its :term:`scan` feature. |
7534ba
|
749 |
|
CM |
750 |
Translation String |
197f0c
|
751 |
An instance of :class:`pyramid.i18n.TranslationString`, which |
7534ba
|
752 |
is a class that behaves like a Unicode string, but has several |
CM |
753 |
extra attributes such as ``domain``, ``msgid``, and ``mapping`` |
|
754 |
for use during translation. Translation strings are usually |
|
755 |
created by hand within software, but are sometimes created on the |
|
756 |
behalf of the system for automatic template translation. For |
|
757 |
more information, see :ref:`i18n_chapter`. |
|
758 |
|
|
759 |
Translation Domain |
|
760 |
A string representing the "context" in which a translation was |
|
761 |
made. For example the word "java" might be translated |
|
762 |
differently if the translation domain is "programming-languages" |
|
763 |
than would be if the translation domain was "coffee". A |
2a079b
|
764 |
translation domain is represented by a collection of ``.mo`` files |
7534ba
|
765 |
within one or more :term:`translation directory` directories. |
CM |
766 |
|
2a079b
|
767 |
Translation Context |
SP |
768 |
A string representing the "context" in which a translation was |
|
769 |
made within a given :term:`translation domain`. See the gettext |
|
770 |
documentation, `11.2.5 Using contexts for solving ambiguities |
|
771 |
<https://www.gnu.org/software/gettext/manual/gettext.html#Contexts>`_ |
|
772 |
for more information. |
|
773 |
|
7534ba
|
774 |
Translator |
050868
|
775 |
A callable which receives a :term:`translation string` and returns a |
CM |
776 |
translated Unicode object for the purposes of internationalization. A |
|
777 |
:term:`localizer` supplies a translator to a :app:`Pyramid` application |
|
778 |
accessible via its :class:`~pyramid.i18n.Localizer.translate` method. |
7534ba
|
779 |
|
CM |
780 |
Translation Directory |
|
781 |
A translation directory is a :term:`gettext` translation |
|
782 |
directory. It contains language folders, which themselves |
|
783 |
contain ``LC_MESSAGES`` folders, which contain ``.mo`` files. |
|
784 |
Each ``.mo`` file represents a set of translations for a language |
|
785 |
in a :term:`translation domain`. The name of the ``.mo`` file |
|
786 |
(minus the .mo extension) is the translation domain name. |
|
787 |
|
|
788 |
Localizer |
197f0c
|
789 |
An instance of the class :class:`pyramid.i18n.Localizer` which |
7534ba
|
790 |
provides translation and pluralization services to an |
CM |
791 |
application. It is retrieved via the |
197f0c
|
792 |
:func:`pyramid.i18n.get_localizer` function. |
7534ba
|
793 |
|
CM |
794 |
Locale Name |
|
795 |
A string like ``en``, ``en_US``, ``de``, or ``de_AT`` which |
|
796 |
uniquely identifies a particular locale. |
|
797 |
|
b5dc7f
|
798 |
Default Locale Name |
CM |
799 |
The :term:`locale name` used by an application when no explicit |
|
800 |
locale name is set. See :ref:`localization_deployment_settings`. |
|
801 |
|
7534ba
|
802 |
Locale Negotiator |
CM |
803 |
An object supplying a policy determining which :term:`locale |
|
804 |
name` best represents a given :term:`request`. It is used by the |
197f0c
|
805 |
:func:`pyramid.i18n.get_locale_name`, and |
CM |
806 |
:func:`pyramid.i18n.negotiate_locale_name` functions, and |
|
807 |
indirectly by :func:`pyramid.i18n.get_localizer`. The |
|
808 |
:func:`pyramid.i18n.default_locale_negotiator` function |
7534ba
|
809 |
is an example of a locale negotiator. |
CM |
810 |
|
|
811 |
Gettext |
|
812 |
The GNU `gettext <http://www.gnu.org/software/gettext/>`_ |
fd5ae9
|
813 |
library, used by the :app:`Pyramid` translation machinery. |
7534ba
|
814 |
|
CM |
815 |
Babel |
8d212a
|
816 |
A `collection of tools <http://babel.pocoo.org/en/latest/>`_ for |
SP |
817 |
internationalizing Python applications. :app:`Pyramid` does not depend on |
|
818 |
Babel to operate, but if Babel is installed, additional locale |
|
819 |
functionality becomes available to your application. |
7534ba
|
820 |
|
5119ae
|
821 |
Lingua |
98a99d
|
822 |
A package by Wichert Akkerman which provides the ``pot-create`` |
WA |
823 |
command to extract translateable messages from Python sources |
|
824 |
and Chameleon ZPT template files. |
5119ae
|
825 |
|
7534ba
|
826 |
Message Identifier |
CM |
827 |
A string used as a translation lookup key during localization. |
|
828 |
The ``msgid`` argument to a :term:`translation string` is a |
|
829 |
message identifier. Message identifiers are also present in a |
|
830 |
:term:`message catalog`. |
|
831 |
|
|
832 |
Message Catalog |
|
833 |
A :term:`gettext` ``.mo`` file containing translations. |
|
834 |
|
df3beb
|
835 |
Internationalization |
CM |
836 |
The act of creating software with a user interface that can |
|
837 |
potentially be displayed in more than one language or cultural |
|
838 |
context. Often shortened to "i18n" (because the word |
2033ee
|
839 |
"internationalization" is I, 18 letters, then N). |
SP |
840 |
|
|
841 |
.. seealso:: |
|
842 |
|
|
843 |
See also :term:`Localization`. |
7534ba
|
844 |
|
df3beb
|
845 |
Localization |
CM |
846 |
The process of displaying the user interface of an |
|
847 |
internationalized application in a particular language or |
|
848 |
cultural context. Often shortened to "l10" (because the word |
2033ee
|
849 |
"localization" is L, 10 letters, then N). |
SP |
850 |
|
|
851 |
.. seealso:: |
|
852 |
|
|
853 |
See also :term:`Internationalization`. |
250c02
|
854 |
|
CM |
855 |
renderer globals |
c6601f
|
856 |
Values injected as names into a renderer by a |
CM |
857 |
:class:`pyramid.event.BeforeRender` event. |
81d3b5
|
858 |
|
CM |
859 |
response callback |
|
860 |
A user-defined callback executed by the :term:`router` at a |
|
861 |
point after a :term:`response` object is successfully created. |
2033ee
|
862 |
|
SP |
863 |
.. seealso:: |
|
864 |
|
|
865 |
See also :ref:`using_response_callbacks`. |
81d3b5
|
866 |
|
CM |
867 |
finished callback |
|
868 |
A user-defined callback executed by the :term:`router` |
|
869 |
unconditionally at the very end of request processing . See |
|
870 |
:ref:`using_finished_callbacks`. |
70f1cd
|
871 |
|
CM |
872 |
pregenerator |
|
873 |
A pregenerator is a function associated by a developer with a |
050868
|
874 |
:term:`route`. It is called by |
CM |
875 |
:meth:`~pyramid.request.Request.route_url` in order to adjust the set |
|
876 |
of arguments passed to it by the user for special purposes. It will |
|
877 |
influence the URL returned by |
|
878 |
:meth:`~pyramid.request.Request.route_url`. See |
|
879 |
:class:`pyramid.interfaces.IRoutePregenerator` for more information. |
04ebd5
|
880 |
|
CM |
881 |
session |
|
882 |
A namespace that is valid for some period of continual activity |
|
883 |
that can be used to represent a user's interaction with a web |
|
884 |
application. |
|
885 |
|
|
886 |
session factory |
643a83
|
887 |
A callable, which, when called with a single argument named ``request`` |
CM |
888 |
(a :term:`request` object), returns a :term:`session` object. See |
|
889 |
:ref:`using_the_default_session_factory`, |
|
890 |
:ref:`using_alternate_session_factories` and |
|
891 |
:meth:`pyramid.config.Configurator.set_session_factory` for more |
|
892 |
information. |
04ebd5
|
893 |
|
7698bd
|
894 |
Mako |
043ccd
|
895 |
`Mako <http://www.makotemplates.org/>`_ is a template language |
7698bd
|
896 |
which refines the familiar ideas of componentized layout and inheritance |
BB |
897 |
using Python with Python scoping and calling semantics. |
2f980d
|
898 |
|
CM |
899 |
View handler |
|
900 |
A view handler ties together |
d7f259
|
901 |
:meth:`pyramid.config.Configurator.add_route` and |
2323d4
|
902 |
:meth:`pyramid.config.Configurator.add_view` to make it more convenient |
CM |
903 |
to register a collection of views as a single class when using |
|
904 |
:term:`url dispatch`. View handlers ship as part of the |
|
905 |
:term:`pyramid_handlers` add-on package. |
a1365e
|
906 |
|
CM |
907 |
Deployment settings |
|
908 |
Deployment settings are settings passed to the :term:`Configurator` as a |
|
909 |
``settings`` argument. These are later accessible via a |
050868
|
910 |
``request.registry.settings`` dictionary in views or as |
CM |
911 |
``config.registry.settings`` in configuration code. Deployment settings |
|
912 |
can be used as global application values. |
a1365e
|
913 |
|
6ee49a
|
914 |
WebTest |
1cb30e
|
915 |
`WebTest <http://webtest.pythonpaste.org/en/latest/>`_ is a package which can help |
6ee49a
|
916 |
you write functional tests for your WSGI application. |
CM |
917 |
|
80aa77
|
918 |
view mapper |
CM |
919 |
A view mapper is a class which implements the |
|
920 |
:class:`pyramid.interfaces.IViewMapperFactory` interface, which performs |
|
921 |
view argument and return value mapping. This is a plug point for |
|
922 |
extension builders, not normally used by "civilians". |
6ee49a
|
923 |
|
5653d1
|
924 |
matchdict |
CM |
925 |
The dictionary attached to the :term:`request` object as |
|
926 |
``request.matchdict`` when a :term:`URL dispatch` route has been matched. |
|
927 |
Its keys are names as identified within the route pattern; its values are |
|
928 |
the values matched by each pattern name. |
c9c3c4
|
929 |
|
CM |
930 |
pyramid_zcml |
|
931 |
An add-on package to :app:`Pyramid` which allows applications to be |
55ce9d
|
932 |
configured via :term:`ZCML`. It is available on :term:`PyPI`. If you |
050868
|
933 |
use :mod:`pyramid_zcml`, you can use ZCML as an alternative to |
55ce9d
|
934 |
:term:`imperative configuration` or :term:`configuration decoration`. |
c9c3c4
|
935 |
|
CM |
936 |
ZCML |
|
937 |
`Zope Configuration Markup Language |
1cb30e
|
938 |
<http://muthukadan.net/docs/zca.html#zcml>`_, an XML dialect |
2e3f70
|
939 |
used by Zope and :term:`pyramid_zcml` for configuration tasks. |
c9c3c4
|
940 |
|
78fe62
|
941 |
pyramid_handlers |
CM |
942 |
An add-on package which allows :app:`Pyramid` users to create classes |
|
943 |
that are analogues of Pylons 1 "controllers". See |
1c561a
|
944 |
https://docs.pylonsproject.org/projects/pyramid_handlers/en/latest/. |
78fe62
|
945 |
|
2323d4
|
946 |
pyramid_jinja2 |
CM |
947 |
:term:`Jinja2` templating system bindings for Pyramid, documented at |
1c561a
|
948 |
https://docs.pylonsproject.org/projects/pyramid_jinja2/en/latest/. This |
1cb30e
|
949 |
package also includes a scaffold named ``pyramid_jinja2_starter``, which |
SP |
950 |
creates an application package based on the Jinja2 templating system. |
2323d4
|
951 |
|
0eb82e
|
952 |
Akhet |
1c561a
|
953 |
`Akhet <https://docs.pylonsproject.org/projects/akhet/en/latest/>`_ is a |
94c28e
|
954 |
Pyramid library and demo application with a Pylons-like feel. |
MO |
955 |
It's most known for its former application scaffold, which helped |
7096d9
|
956 |
users transition from Pylons and those preferring a more Pylons-like API. |
94c28e
|
957 |
The scaffold has been retired but the demo plays a similar role. |
2323d4
|
958 |
|
34515f
|
959 |
Pyramid Community Cookbook |
6860b2
|
960 |
Additional, community-based documentation for Pyramid which presents |
SP |
961 |
topical, practical uses of Pyramid: |
|
962 |
:ref:`Pyramid Community Cookbook <cookbook:pyramid-cookbook>` |
4cf41f
|
963 |
|
ff3ba5
|
964 |
distutils |
CM |
965 |
The standard system for packaging and distributing Python packages. See |
1cb30e
|
966 |
https://docs.python.org/2/distutils/index.html for more information. |
ff3ba5
|
967 |
:term:`setuptools` is actually an *extension* of the Distutils. |
CM |
968 |
|
df15ed
|
969 |
exception response |
CM |
970 |
A :term:`response` that is generated as the result of a raised exception |
|
971 |
being caught by an :term:`exception view`. |
2323d4
|
972 |
|
f98925
|
973 |
PyPy |
CM |
974 |
PyPy is an "alternative implementation of the Python |
f65e19
|
975 |
language": http://pypy.org/ |
f98925
|
976 |
|
dc7122
|
977 |
tween |
CM |
978 |
A bit of code that sits between the Pyramid router's main request |
|
979 |
handling function and the upstream WSGI component that uses |
05f610
|
980 |
:app:`Pyramid` as its 'app'. The word "tween" is a contraction of |
CM |
981 |
"between". A tween may be used by Pyramid framework extensions, to |
|
982 |
provide, for example, Pyramid-specific view timing support, bookkeeping |
|
983 |
code that examines exceptions before they are returned to the upstream |
|
984 |
WSGI application, or a variety of other features. Tweens behave a bit |
37607c
|
985 |
like :term:`WSGI` :term:`middleware` but they have the benefit of running in a |
dc7122
|
986 |
context in which they have access to the Pyramid :term:`application |
05f610
|
987 |
registry` as well as the Pyramid rendering machinery. See |
CM |
988 |
:ref:`registering_tweens`. |
dc7122
|
989 |
|
391402
|
990 |
pyramid_debugtoolbar |
4b43ba
|
991 |
A Pyramid add-on which displays a helpful debug toolbar "on top of" HTML |
391402
|
992 |
pages rendered by your application, displaying request, routing, and |
050868
|
993 |
database information. :mod:`pyramid_debugtoolbar` is configured into |
CM |
994 |
the ``development.ini`` of all applications which use a Pyramid |
af33f7
|
995 |
:term:`cookiecutter`. For more information, see |
1c561a
|
996 |
https://docs.pylonsproject.org/projects/pyramid_debugtoolbar/en/latest/. |
391402
|
997 |
|
CM |
998 |
scaffold |
989544
|
999 |
A project template that generates some of the major parts of a Pyramid |
SP |
1000 |
application and helps users to quickly get started writing larger |
|
1001 |
applications. Scaffolds are usually used via the ``pcreate`` command. |
391402
|
1002 |
|
e7b12f
|
1003 |
.. deprecated:: 1.8 |
SP |
1004 |
|
|
1005 |
.. seealso:: See also :term:`cookiecutter`. |
|
1006 |
|
bfdbcf
|
1007 |
pyramid_exclog |
CM |
1008 |
A package which logs Pyramid application exception (error) information |
|
1009 |
to a standard Python logger. This add-on is most useful when |
|
1010 |
used in production applications, because the logger can be configured to |
|
1011 |
log to a file, to UNIX syslog, to the Windows Event Log, or even to |
|
1012 |
email. See its `documentation |
1c561a
|
1013 |
<https://docs.pylonsproject.org/projects/pyramid_exclog/en/latest/>`_. |
d36b56
|
1014 |
|
5edd54
|
1015 |
console script |
CM |
1016 |
A script written to the ``bin`` (on UNIX, or ``Scripts`` on Windows) |
d67566
|
1017 |
directory of a Python installation or :term:`virtual environment` as the |
SP |
1018 |
result of running ``pip install`` or ``pip install -e .``. |
5edd54
|
1019 |
|
c4503b
|
1020 |
introspector |
CM |
1021 |
An object with the methods described by |
|
1022 |
:class:`pyramid.interfaces.IIntrospector` that is available in both |
|
1023 |
configuration code (for registration) and at runtime (for querying) that |
|
1024 |
allows a developer to introspect configuration statements and |
|
1025 |
relationships between those statements. |
|
1026 |
|
|
1027 |
conflict resolution |
|
1028 |
Pyramid attempts to resolve ambiguous configuration statements made by |
|
1029 |
application developers via automatic conflict resolution. Automatic |
|
1030 |
conflict resolution is described in |
|
1031 |
:ref:`automatic_conflict_resolution`. If Pyramid cannot resolve |
|
1032 |
ambiguous configuration statements, it is possible to manually resolve |
|
1033 |
them as described in :ref:`manually_resolving_conflicts`. |
|
1034 |
|
|
1035 |
configuration directive |
|
1036 |
A method of the :term:`Configurator` which causes a configuration action |
|
1037 |
to occur. The method :meth:`pyramid.config.Configurator.add_view` is a |
|
1038 |
configuration directive, and application developers can add their own |
|
1039 |
directives as necessary (see :ref:`add_directive`). |
|
1040 |
|
|
1041 |
action |
|
1042 |
Represents a pending configuration statement generated by a call to a |
|
1043 |
:term:`configuration directive`. The set of pending configuration |
|
1044 |
actions are processed when :meth:`pyramid.config.Configurator.commit` is |
|
1045 |
called. |
|
1046 |
|
|
1047 |
discriminator |
|
1048 |
The unique identifier of an :term:`action`. |
|
1049 |
|
|
1050 |
introspectable |
|
1051 |
An object which implements the attributes and methods described in |
|
1052 |
:class:`pyramid.interfaces.IIntrospectable`. Introspectables are used |
|
1053 |
by the :term:`introspector` to display configuration information about |
|
1054 |
a running Pyramid application. An introspectable is associated with a |
|
1055 |
:term:`action` by virtue of the |
|
1056 |
:meth:`pyramid.config.Configurator.action` method. |
56df90
|
1057 |
|
CM |
1058 |
asset descriptor |
|
1059 |
An instance representing an :term:`asset specification` provided by the |
|
1060 |
:meth:`pyramid.path.AssetResolver.resolve` method. It supports the |
|
1061 |
methods and attributes documented in |
|
1062 |
:class:`pyramid.interfaces.IAssetDescriptor`. |
c3a36b
|
1063 |
|
CM |
1064 |
Waitress |
a36d33
|
1065 |
A :term:`WSGI` server that runs on UNIX and Windows under Python 2.7+ |
SP |
1066 |
and Python 3.3+. Projects generated via Pyramid cookiecutters use |
c3a36b
|
1067 |
Waitress as a WGSI server. See |
1c561a
|
1068 |
https://docs.pylonsproject.org/projects/waitress/en/latest/ for detailed |
c3a36b
|
1069 |
information. |
CM |
1070 |
|
|
1071 |
Green Unicorn |
|
1072 |
Aka ``gunicorn``, a fast :term:`WSGI` server that runs on UNIX under |
ab2fed
|
1073 |
Python 2.6+ or Python 3.1+. See http://gunicorn.org/ for detailed |
CM |
1074 |
information. |
0196b2
|
1075 |
|
CM |
1076 |
predicate factory |
|
1077 |
A callable which is used by a third party during the registration of a |
95f766
|
1078 |
route, view, or subscriber predicates to extend the configuration |
0196b2
|
1079 |
system. See :ref:`registering_thirdparty_predicates` for more |
CM |
1080 |
information. |
95f766
|
1081 |
|
d559af
|
1082 |
add-on |
PE |
1083 |
A Python :term:`distribution` that uses Pyramid's extensibility |
|
1084 |
to plug into a Pyramid application and provide extra, |
c6601f
|
1085 |
configurable services. |
ab2fed
|
1086 |
|
CM |
1087 |
pyramid_redis_sessions |
|
1088 |
A package by Eric Rasmussen which allows you to store Pyramid session |
|
1089 |
data in a Redis database. See |
62ab0f
|
1090 |
https://pypi.org/project/pyramid_redis_sessions/ for more information. |
ab2fed
|
1091 |
|
3a4119
|
1092 |
cache busting |
MM |
1093 |
A technique used when serving a cacheable static asset in order to force |
|
1094 |
a client to query the new version of the asset. See :ref:`cache_busting` |
|
1095 |
for more information. |
b4147b
|
1096 |
|
MM |
1097 |
view deriver |
|
1098 |
A view deriver is a composable component of the view pipeline which is |
|
1099 |
used to create a :term:`view callable`. A view deriver is a callable |
|
1100 |
implementing the :class:`pyramid.interfaces.IViewDeriver` interface. |
890ea8
|
1101 |
Examples of built-in derivers including view mapper, the permission |
7fc181
|
1102 |
checker, and applying a renderer to a dictionary returned from the view. |
6b35eb
|
1103 |
|
MM |
1104 |
truthy string |
|
1105 |
A string represeting a value of ``True``. Acceptable values are |
|
1106 |
``t``, ``true``, ``y``, ``yes``, ``on`` and ``1``. |
|
1107 |
|
|
1108 |
falsey string |
|
1109 |
A string represeting a value of ``False``. Acceptable values are |
|
1110 |
``f``, ``false``, ``n``, ``no``, ``off`` and ``0``. |
231a53
|
1111 |
|
a7dd05
|
1112 |
pip |
b61a8b
|
1113 |
The :term:`Python Packaging Authority`'s recommended tool for installing |
SP |
1114 |
Python packages. |
ec1bbf
|
1115 |
|
SP |
1116 |
pyvenv |
b61a8b
|
1117 |
The :term:`Python Packaging Authority` formerly recommended using the |
SP |
1118 |
``pyvenv`` command for `creating virtual environments on Python 3.4 and |
|
1119 |
3.5 |
d60369
|
1120 |
<https://packaging.python.org/en/latest/installing/#creating-virtual-environments>`_, |
b61a8b
|
1121 |
but it was deprecated in 3.6 in favor of ``python3 -m venv`` on UNIX or |
83d7d9
|
1122 |
``python -m venv`` on Windows, which is backward compatible on Python |
SP |
1123 |
3.3 and greater. |
d60369
|
1124 |
|
d67566
|
1125 |
virtual environment |
SP |
1126 |
An isolated Python environment that allows packages to be installed for |
|
1127 |
use by a particular application, rather than being installed system wide. |
|
1128 |
|
d60369
|
1129 |
venv |
b61a8b
|
1130 |
The :term:`Python Packaging Authority`'s recommended tool for creating |
SP |
1131 |
virtual environments on Python 3.3 and greater. |
d67566
|
1132 |
|
SP |
1133 |
Note: whenever you encounter commands prefixed with ``$VENV`` (Unix) |
|
1134 |
or ``%VENV`` (Windows), know that that is the environment variable whose |
|
1135 |
value is the root of the virtual environment in question. |
b61a8b
|
1136 |
|
SP |
1137 |
Python Packaging Authority |
|
1138 |
The `Python Packaging Authority (PyPA) <https://www.pypa.io/en/latest/>`_ |
|
1139 |
is a working group that maintains many of the relevant projects in Python |
e7b12f
|
1140 |
packaging. |
SP |
1141 |
|
|
1142 |
cookiecutter |
|
1143 |
A command-line utility that creates projects from :ref:`cookiecutters <cookiecutter:readme>` (project templates), e.g., creating a Python package project from a Python package project template. |
|
1144 |
|
|
1145 |
Pyramid cookiecutters include: |
|
1146 |
|
|
1147 |
* `pyramid-cookiecutter-alchemy <https://github.com/Pylons/pyramid-cookiecutter-alchemy>`_ |
|
1148 |
* `pyramid-cookiecutter-starter <https://github.com/Pylons/pyramid-cookiecutter-starter>`_ |
|
1149 |
* `pyramid-cookiecutter-zodb <https://github.com/Pylons/pyramid-cookiecutter-zodb>`_ |
|
1150 |
|
|
1151 |
.. versionadded:: 1.8 |
|
1152 |
|
|
1153 |
.. seealso:: See also :term:`scaffold`. |
|
1154 |
|
|
1155 |
coverage |
|
1156 |
A measurement of code coverage, usually expressed as a percentage of which lines of code have been executed over which lines are executable, typically run during test execution. |