diff options
Diffstat (limited to 'docs/glossary.rst')
| -rw-r--r-- | docs/glossary.rst | 381 |
1 files changed, 258 insertions, 123 deletions
diff --git a/docs/glossary.rst b/docs/glossary.rst index 2cc461a77..4668efe6d 100644 --- a/docs/glossary.rst +++ b/docs/glossary.rst @@ -16,6 +16,11 @@ Glossary An object which, provided a :term:`WSGI` environment as a single positional argument, returns a Pyramid-compatible request. + response factory + An object which, provided a :term:`request` as a single positional + argument, returns a Pyramid-compatible response. See + :class:`pyramid.interfaces.IResponseFactory`. + response An object returned by a :term:`view callable` that represents response data returned to the requesting user agent. It must implement the @@ -31,26 +36,24 @@ Glossary Repoze "Repoze" is essentially a "brand" of software developed by `Agendaless - Consulting <http://agendaless.com>`_ and a set of contributors. The + Consulting <https://agendaless.com>`_ and a set of contributors. The term has no special intrinsic meaning. The project's `website <http://repoze.org>`_ has more information. The software developed "under the brand" is available in a `Subversion repository <http://svn.repoze.org>`_. Pyramid was originally known as :mod:`repoze.bfg`. - setuptools - `Setuptools <http://peak.telecommunity.com/DevCenter/setuptools>`_ + Setuptools + `Setuptools <https://setuptools.readthedocs.io/en/latest/>`_ builds on Python's ``distutils`` to provide easier building, - distribution, and installation of libraries and applications. As of - this writing, setuptools runs under Python 2, but not under Python 3. - You can use :term:`distribute` under Python 3 instead. + distribution, and installation of libraries and applications. distribute - `Distribute <http://packages.python.org/distribute/>`_ is a fork of - :term:`setuptools` which runs on both Python 2 and Python 3. + `Distribute <https://pypi.org/project/distribute/>`_ is a fork of :term:`Setuptools` which runs on both Python 2 and Python 3. + It is now in legacy state because :term:`Setuptools` now runs on both Python 2 and 3. pkg_resources - A module which ships with :term:`setuptools` and :term:`distribute` that + A module which ships with :term:`Setuptools` and :term:`distribute` that provides an API for addressing "asset files" within a Python :term:`package`. Asset files are static files, template files, etc; basically anything non-Python-source that lives in a Python package can @@ -98,7 +101,7 @@ Glossary ``easy_install``. entry point - A :term:`setuptools` indirection, defined within a setuptools + A :term:`Setuptools` indirection, defined within a Setuptools :term:`distribution` setup.py. It is usually a name which refers to a function somewhere in a package which is held by the distribution. @@ -106,7 +109,7 @@ Glossary dotted Python name A reference to a Python object by name using a string, in the form ``path.to.modulename:attributename``. Often used in Pyramid and - setuptools configurations. A variant is used in dotted names within + Setuptools configurations. A variant is used in dotted names within configurator method arguments that name objects (such as the "add_view" method's "view" and "context" attributes): the colon (``:``) is not used; in its place is a dot. @@ -150,9 +153,9 @@ Glossary request before it returns a :term:`context` resource. virtualenv - A term referring both to an isolated Python environment, - or `the leading tool <http://www.virtualenv.org>`_ that allows one to - create such environments. + The `virtualenv tool <https://virtualenv.pypa.io/en/latest/>`_ that allows + one to create virtual environments. In Python 3.3 and greater, + :term:`venv` is the preferred tool. Note: whenever you encounter commands prefixed with ``$VENV`` (Unix) or ``%VENV`` (Windows), know that that is the environment variable whose @@ -229,7 +232,7 @@ Glossary object *location-aware*. permission - A string or unicode object that represents an action being taken against + A string or Unicode object that represents an action being taken against a :term:`context` resource. A permission is associated with a view name and a resource type by the developer. Resources are decorated with security declarations (e.g. an :term:`ACL`), which reference these @@ -268,7 +271,7 @@ Glossary (Allow, 'bob', 'read'), (Deny, 'fred', 'write')]``. If an ACL is attached to a resource instance, and that resource is findable via the context resource, it will be consulted any active security policy to - determine wither a particular request can be fulfilled given the + determine whether a particular request can be fulfilled given the :term:`authentication` information in the request. authentication @@ -286,13 +289,22 @@ Glossary :term:`authorization policy`. principal - A *principal* is a string or unicode object representing a userid - or a group id. It is provided by an :term:`authentication - policy`. For example, if a user had the user id "bob", and Bob - was part of two groups named "group foo" and "group bar", the - request might have information attached to it that would - indicate that Bob was represented by three principals: "bob", - "group foo" and "group bar". + A *principal* is a string or Unicode object representing an entity, + typically a user or group. Principals are provided by an + :term:`authentication policy`. For example, if a user has the + :term:`userid` `bob`, and is a member of two groups named `group foo` and + `group bar`, then the request might have information attached to it + indicating that Bob was represented by three principals: `bob`, `group + foo` and `group bar`. + + userid + A *userid* is a string or Unicode object used to identify and authenticate + a real-world user or client. A userid is supplied to an + :term:`authentication policy` in order to discover the user's + :term:`principals <principal>`. In the authentication policies which + :app:`Pyramid` provides, the default behavior returns the user's userid as + a principal, but this is not strictly necessary in custom policies that + define their principals differently. authorization policy An authorization policy in :app:`Pyramid` terms is a bit of @@ -307,83 +319,90 @@ Glossary :term:`principal` (or principals) associated with a request. WSGI - `Web Server Gateway Interface <http://www.wsgi.org/>`_. This is a - Python standard for connecting web applications to web servers, - similar to the concept of Java Servlets. :app:`Pyramid` requires - that your application be served as a WSGI application. + `Web Server Gateway Interface <https://wsgi.readthedocs.io/en/latest/>`_. + This is a Python standard for connecting web applications to web servers, + similar to the concept of Java Servlets. :app:`Pyramid` requires that + your application be served as a WSGI application. middleware *Middleware* is a :term:`WSGI` concept. It is a WSGI component that acts both as a server and an application. Interesting uses for middleware exist, such as caching, content-transport - encoding, and other functions. See `WSGI.org <http://www.wsgi.org>`_ - or `PyPI <http://python.org/pypi>`_ to find middleware for your - application. + encoding, and other functions. See `WSGI documentation + <https://wsgi.readthedocs.io/en/latest/>`_ or `PyPI + <https://pypi.org/>`_ to find middleware for your application. pipeline The :term:`PasteDeploy` term for a single configuration of a WSGI server, a WSGI application, with a set of :term:`middleware` in-between. Zope - `The Z Object Publishing Framework <http://zope.org>`_, a + `The Z Object Publishing Framework <http://www.zope.org/en/latest/>`_, a full-featured Python web framework. Grok - `A web framework based on Zope 3 <http://grok.zope.org>`_. + `A web framework based on Zope 3 <https://web.archive.org/web/20180615015013/http://grok.zope.org>`_. Django - `A full-featured Python web framework <http://djangoproject.com>`_. + `A full-featured Python web framework <https://www.djangoproject.com/>`_. Pylons - `A lightweight Python web framework <http://docs.pylonsproject.org/projects/pylons-webframework/en/latest/>`_ + `A lightweight Python web framework <https://docs.pylonsproject.org/projects/pylons-webframework/en/latest/>`_ and a predecessor of Pyramid. ZODB - `Zope Object Database <http://zodb.org>`_, a - persistent Python object store. + `Zope Object Database <http://www.zodb.org/en/latest/>`_, a persistent + Python object store. WebOb - `WebOb <http://webob.org>`_ is a WSGI request/response + `WebOb <https://webob.org>`_ is a WSGI request/response library created by Ian Bicking. PasteDeploy - `PasteDeploy <http://pythonpaste.org/deploy/>`_ is a library used by + `PasteDeploy <https://pastedeploy.readthedocs.io/en/latest/>`_ is a library used by :app:`Pyramid` which makes it possible to configure :term:`WSGI` components together declaratively within an ``.ini`` file. It was developed by Ian Bicking. + plaster + `plaster <https://docs.pylonsproject.org/projects/plaster/en/latest/>`_ is + a library used by :app:`Pyramid` which acts as an abstraction between + command-line scripts and the file format used to load the :term:`WSGI` + components and application settings. By default :app:`Pyramid` ships + with the ``plaster_pastedeploy`` library installed which provides + integrated support for loading a :term:`PasteDeploy` INI file. + Chameleon - `chameleon <http://chameleon.repoze.org>`_ is an attribute language - template compiler which supports the :term:`ZPT` templating - specification. It is written and maintained by Malthe Borch. It has - several extensions, such as the ability to use bracketed (Mako-style) - ``${name}`` syntax. It is also much faster than the reference - implementation of ZPT. :app:`Pyramid` offers Chameleon templating out - of the box in ZPT and text flavors. + `chameleon <https://chameleon.readthedocs.io/en/latest/>`_ is an + attribute language template compiler which supports the :term:`ZPT` + templating specification. It is written and maintained by Malthe Borch. It + has several extensions, such as the ability to use bracketed (Mako-style) + ``${name}`` syntax. It is also much faster than the reference + implementation of ZPT. :app:`Pyramid` offers Chameleon templating out of + the box in ZPT and text flavors. ZPT - The `Zope Page Template <http://wiki.zope.org/ZPT/FrontPage>`_ + The `Zope Page Template <https://zope.readthedocs.io/en/latest/zope2book/ZPT.html>`_ templating language. METAL - `Macro Expansion for TAL <http://wiki.zope.org/ZPT/METAL>`_, a - part of :term:`ZPT` which makes it possible to share common look - and feel between templates. + `Macro Expansion for TAL + <https://zope.readthedocs.io/en/latest/zope2book/AppendixC.html#metal-overview>`_, a + part of :term:`ZPT` which makes it possible to share common look and feel + between templates. Genshi - An `XML templating language <http://pypi.python.org/pypi/Genshi/>`_ + An `XML templating language <https://pypi.org/project/Genshi/>`_ by Christopher Lenz. Jinja2 - A `text templating language <http://jinja.pocoo.org/2/>`_ by Armin - Ronacher. + A `text templating language <http://jinja.pocoo.org/>`_ by Armin Ronacher. Routes - A `system by Ben Bangert <http://routes.groovie.org/>`_ which - parses URLs and compares them against a number of user defined - mappings. The URL pattern matching syntax in :app:`Pyramid` is - inspired by the Routes syntax (which was inspired by Ruby On - Rails pattern syntax). + A `system by Ben Bangert <https://routes.readthedocs.io/en/latest/>`_ + which parses URLs and compares them against a number of user defined + mappings. The URL pattern matching syntax in :app:`Pyramid` is inspired by + the Routes syntax (which was inspired by Ruby On Rails pattern syntax). route A single pattern matched by the :term:`url dispatch` subsystem, @@ -402,7 +421,7 @@ Glossary Zope Component Architecture The `Zope Component Architecture - <http://www.muthukadan.net/docs/zca.html>`_ (aka ZCA) is a system + <http://muthukadan.net/docs/zca.html>`_ (aka ZCA) is a system which allows for application pluggability and complex dispatching based on objects which implement an :term:`interface`. :app:`Pyramid` uses the ZCA "under the hood" to perform view @@ -428,7 +447,7 @@ Glossary subpath. See :ref:`star_subpath` for more information. interface - A `Zope interface <http://pypi.python.org/pypi/zope.interface>`_ + A `Zope interface <https://pypi.org/project/zope.interface/>`_ object. In :app:`Pyramid`, an interface may be attached to a :term:`resource` object or a :term:`request` object in order to identify that the object is "of a type". Interfaces are used @@ -474,13 +493,13 @@ Glossary repoze.catalog An indexing and search facility (fielded and full-text) based on - `zope.index <http://pypi.python.org/pypi/zope.index>`_. See `the + `zope.index <https://pypi.org/project/zope.index/>`_. See `the documentation <http://docs.repoze.org/catalog>`_ for more information. repoze.who - `Authentication middleware <http://docs.repoze.org/who>`_ for - :term:`WSGI` applications. It can be used by :app:`Pyramid` to + `Authentication middleware <https://repozewho.readthedocs.io/en/latest/>`_ + for :term:`WSGI` applications. It can be used by :app:`Pyramid` to provide authentication information. repoze.workflow @@ -541,25 +560,24 @@ Glossary serialization format. jQuery - A popular `Javascript library <http://jquery.org>`_. + A popular `Javascript library <https://jquery.org>`_. renderer - A serializer that can be referred to via :term:`view - configuration` which converts a non-:term:`Response` return - values from a :term:`view` into a string (and ultimately a - response). Using a renderer can make writing views that require - templating or other serialization less tedious. See - :ref:`views_which_use_a_renderer` for more information. + A serializer which converts non-:term:`Response` return values from a + :term:`view` into a string, and ultimately into a response, usually + through :term:`view configuration`. Using a renderer can make writing + views that require templating or other serialization, like JSON, less + tedious. See :ref:`views_which_use_a_renderer` for more information. renderer factory A factory which creates a :term:`renderer`. See :ref:`adding_and_overriding_renderers` for more information. mod_wsgi - `mod_wsgi <http://code.google.com/p/modwsgi/>`_ is an Apache - module developed by Graham Dumpleton. It allows :term:`WSGI` - applications (such as applications developed using - :app:`Pyramid`) to be served using the Apache web server. + `mod_wsgi <https://modwsgi.readthedocs.io/en/develop/>`_ is an Apache + module developed by Graham Dumpleton. It allows :term:`WSGI` applications + (such as applications developed using :app:`Pyramid`) to be served using + the Apache web server. view predicate An argument to a :term:`view configuration` which evaluates to @@ -596,7 +614,7 @@ Glossary .. seealso:: - See also `PEP 318 <http://www.python.org/dev/peps/pep-0318/>`_. + See also `PEP 318 <https://www.python.org/dev/peps/pep-0318/>`_. configuration declaration An individual method call made to a :term:`configuration directive`, @@ -670,7 +688,7 @@ Glossary thread local A thread-local variable is one which is essentially a global variable in terms of how it is accessed and treated, however, each `thread - <http://en.wikipedia.org/wiki/Thread_(computer_science)>`_ used by the + <https://en.wikipedia.org/wiki/Thread_(computer_science)>`_ used by the application may have a different value for this same "global" variable. :app:`Pyramid` uses a small number of thread local variables, as described in :ref:`threadlocals_chapter`. @@ -687,8 +705,8 @@ Glossary :ref:`multidict_narr` and :class:`pyramid.interfaces.IMultiDict`. PyPI - `The Python Package Index <http://pypi.python.org/pypi>`_, a - collection of software available for Python. + `The Python Package Index <https://pypi.org/>`_, a collection + of software available for Python. Agendaless Consulting A consulting organization formed by Paul Everitt, Tres Seaver, @@ -696,14 +714,14 @@ Glossary .. seealso:: - See also `Agendaless Consulting <http://agendaless.com>`_. + See also `Agendaless Consulting <https://agendaless.com>`_. Jython A `Python implementation <http://www.jython.org/>`_ written for the Java Virtual Machine. Python - The `programming language <http://python.org>`_ in which + The `programming language <https://www.python.org>`_ in which :app:`Pyramid` is written. CPython @@ -723,7 +741,7 @@ Glossary subsystems used by :app:`Pyramid`. Google App Engine - `Google App Engine <http://code.google.com/appengine/>`_ (aka + `Google App Engine <https://cloud.google.com/appengine/>`_ (aka "GAE") is a Python application hosting service offered by Google. :app:`Pyramid` runs on GAE. @@ -731,7 +749,7 @@ Glossary :ref:`Venusian` is a library which allows framework authors to defer decorator actions. Instead of taking actions when a function (or class) decorator is executed - at import time, the action usually taken by the decorator is + at :term:`import time`, the action usually taken by the decorator is deferred until a separate "scan" phase. :app:`Pyramid` relies on Venusian to provide a basis for its :term:`scan` feature. @@ -749,9 +767,16 @@ Glossary made. For example the word "java" might be translated differently if the translation domain is "programming-languages" than would be if the translation domain was "coffee". A - translation domain is represnted by a collection of ``.mo`` files + translation domain is represented by a collection of ``.mo`` files within one or more :term:`translation directory` directories. + Translation Context + A string representing the "context" in which a translation was + made within a given :term:`translation domain`. See the gettext + documentation, `11.2.5 Using contexts for solving ambiguities + <https://www.gnu.org/software/gettext/manual/gettext.html#Contexts>`_ + for more information. + Translator A callable which receives a :term:`translation string` and returns a translated Unicode object for the purposes of internationalization. A @@ -794,11 +819,10 @@ Glossary library, used by the :app:`Pyramid` translation machinery. Babel - A `collection of tools <http://babel.edgewall.org/>`_ for - internationalizing Python applications. :app:`Pyramid` does - not depend on Babel to operate, but if Babel is installed, - additional locale functionality becomes available to your - application. + A `collection of tools <http://babel.pocoo.org/en/latest/>`_ for + internationalizing Python applications. :app:`Pyramid` does not depend on + Babel to operate, but if Babel is installed, additional locale + functionality becomes available to your application. Lingua A package by Wichert Akkerman which provides the ``pot-create`` @@ -827,7 +851,7 @@ Glossary Localization The process of displaying the user interface of an internationalized application in a particular language or - cultural context. Often shortened to "l10" (because the word + cultural context. Often shortened to "l10n" (because the word "localization" is L, 10 letters, then N). .. seealso:: @@ -873,6 +897,11 @@ Glossary :meth:`pyramid.config.Configurator.set_session_factory` for more information. + CSRF storage policy + A utility that implements :class:`pyramid.interfaces.ICSRFStoragePolicy` + which is responsible for allocating CSRF tokens to a user and verifying + that a provided token is acceptable. + Mako `Mako <http://www.makotemplates.org/>`_ is a template language which refines the familiar ideas of componentized layout and inheritance @@ -894,8 +923,7 @@ Glossary can be used as global application values. WebTest - `WebTest <http://pythonpaste.org/webtest/>`_ is a package which can help - you write functional tests for your WSGI application. + `WebTest <https://docs.pylonsproject.org/projects/webtest/en/latest/>`_ is a package which can help you write functional tests for your WSGI application. view mapper A view mapper is a class which implements the @@ -917,37 +945,36 @@ Glossary ZCML `Zope Configuration Markup Language - <http://www.muthukadan.net/docs/zca.html#zcml>`_, an XML dialect + <http://muthukadan.net/docs/zca.html#zcml>`_, an XML dialect used by Zope and :term:`pyramid_zcml` for configuration tasks. pyramid_handlers An add-on package which allows :app:`Pyramid` users to create classes that are analogues of Pylons 1 "controllers". See - http://docs.pylonsproject.org/projects/pyramid_handlers/dev/ . + https://docs.pylonsproject.org/projects/pyramid_handlers/en/latest/. pyramid_jinja2 :term:`Jinja2` templating system bindings for Pyramid, documented at - http://docs.pylonsproject.org/projects/pyramid_jinja2/dev/ . This - package also includes a scaffold named - ``pyramid_jinja2_starter``, which creates an application package based - on the Jinja2 templating system. + https://docs.pylonsproject.org/projects/pyramid_jinja2/en/latest/. This + package also includes a scaffold named ``pyramid_jinja2_starter``, which + creates an application package based on the Jinja2 templating system. Akhet - `Akhet <http://docs.pylonsproject.org/projects/akhet/en/latest/>`_ is a + `Akhet <https://docs.pylonsproject.org/projects/akhet/en/latest/>`_ is a Pyramid library and demo application with a Pylons-like feel. It's most known for its former application scaffold, which helped - users transition from Pylons and those prefering a more Pylons-like API. + users transition from Pylons and those preferring a more Pylons-like API. The scaffold has been retired but the demo plays a similar role. - Pyramid Cookbook - Additional documentation for Pyramid which presents topical, - practical uses of Pyramid: - http://docs.pylonsproject.org/projects/pyramid_cookbook/en/latest. + Pyramid Community Cookbook + Additional, community-based documentation for Pyramid which presents + topical, practical uses of Pyramid: + :ref:`Pyramid Community Cookbook <cookbook:pyramid-cookbook>` distutils The standard system for packaging and distributing Python packages. See - http://docs.python.org/distutils/index.html for more information. - :term:`setuptools` is actually an *extension* of the Distutils. + https://docs.python.org/2/distutils/index.html for more information. + :term:`Setuptools` is actually an *extension* of the Distutils. exception response A :term:`response` that is generated as the result of a raised exception @@ -975,26 +1002,21 @@ Glossary pages rendered by your application, displaying request, routing, and database information. :mod:`pyramid_debugtoolbar` is configured into the ``development.ini`` of all applications which use a Pyramid - :term:`scaffold`. For more information, see - http://docs.pylonsproject.org/projects/pyramid_debugtoolbar/en/latest/. - - scaffold - A project template that generates some of the major parts of a Pyramid - application and helps users to quickly get started writing larger - applications. Scaffolds are usually used via the ``pcreate`` command. + :term:`cookiecutter`. For more information, see + https://docs.pylonsproject.org/projects/pyramid_debugtoolbar/en/latest/. pyramid_exclog A package which logs Pyramid application exception (error) information to a standard Python logger. This add-on is most useful when used in production applications, because the logger can be configured to - log to a file, to UNIX syslog, to the Windows Event Log, or even to + log to a file, to Unix syslog, to the Windows Event Log, or even to email. See its `documentation - <http://docs.pylonsproject.org/projects/pyramid_exclog/dev/>`_. + <https://docs.pylonsproject.org/projects/pyramid_exclog/en/latest/>`_. console script - A script written to the ``bin`` (on UNIX, or ``Scripts`` on Windows) - directory of a Python installation or :term:`virtualenv` as the result of - running ``setup.py install`` or ``setup.py develop``. + A script written to the ``bin`` (on Unix, or ``Scripts`` on Windows) + directory of a Python installation or :term:`virtual environment` as the + result of running ``pip install`` or ``pip install -e .``. introspector An object with the methods described by @@ -1041,15 +1063,15 @@ Glossary :class:`pyramid.interfaces.IAssetDescriptor`. Waitress - A :term:`WSGI` server that runs on UNIX and Windows under Python 2.6+ - and Python 3.2+. Projects generated via Pyramid scaffolding use + A :term:`WSGI` server that runs on Unix and Windows under Python 2.7+ + and Python 3.3+. Projects generated via Pyramid cookiecutters use Waitress as a WGSI server. See - http://docs.pylonsproject.org/projects/waitress/en/latest/ for detailed + https://docs.pylonsproject.org/projects/waitress/en/latest/ for detailed information. Green Unicorn - Aka ``gunicorn``, a fast :term:`WSGI` server that runs on UNIX under - Python 2.6+ or Python 3.1+. See http://gunicorn.org/ for detailed + Aka ``gunicorn``, a fast :term:`WSGI` server that runs on Unix under + Python 2.6+ or Python 3.1+. See https://gunicorn.org/ for detailed information. predicate factory @@ -1066,5 +1088,118 @@ Glossary pyramid_redis_sessions A package by Eric Rasmussen which allows you to store Pyramid session data in a Redis database. See - https://pypi.python.org/pypi/pyramid_redis_sessions for more information. - + https://pypi.org/project/pyramid_redis_sessions/ for more information. + + cache busting + A technique used when serving a cacheable static asset in order to force + a client to query the new version of the asset. See :ref:`cache_busting` + for more information. + + view deriver + A view deriver is a composable component of the view pipeline which is + used to create a :term:`view callable`. A view deriver is a callable + implementing the :class:`pyramid.interfaces.IViewDeriver` interface. + Examples of built-in derivers including view mapper, the permission + checker, and applying a renderer to a dictionary returned from the view. + + truthy string + A string represeting a value of ``True``. Acceptable values are + ``t``, ``true``, ``y``, ``yes``, ``on`` and ``1``. + + falsey string + A string represeting a value of ``False``. Acceptable values are + ``f``, ``false``, ``n``, ``no``, ``off`` and ``0``. + + pip + The :term:`Python Packaging Authority`'s recommended tool for installing + Python packages. + + pyvenv + The :term:`Python Packaging Authority` formerly recommended using the + ``pyvenv`` command for `creating virtual environments on Python 3.4 and + 3.5 + <https://packaging.python.org/tutorials/installing-packages/#creating-virtual-environments>`_, + but it was deprecated in 3.6 in favor of ``python3 -m venv`` on Unix or + ``python -m venv`` on Windows, which is backward compatible on Python + 3.3 and greater. + + virtual environment + An isolated Python environment that allows packages to be installed for + use by a particular application, rather than being installed system wide. + + venv + The :term:`Python Packaging Authority`'s recommended tool for creating + virtual environments on Python 3.3 and greater. + + Note: whenever you encounter commands prefixed with ``$VENV`` (Unix) + or ``%VENV`` (Windows), know that that is the environment variable whose + value is the root of the virtual environment in question. + + Python Packaging Authority + The `Python Packaging Authority (PyPA) <https://www.pypa.io/en/latest/>`_ + is a working group that maintains many of the relevant projects in Python + packaging. + + cookiecutter + 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. + + .. versionadded:: 1.8 + Added cookiecutter support. + + .. versionchanged:: 1.10 + Merged features from ``pyramid-cookiecutter-alchemy`` and ``pyramid-cookiecutter-zodb`` into the single cookiecutter to rule them all, ``pyramid-cookiecutter-starter``. + + .. deprecated:: 1.10 + ``pyramid-cookiecutter-alchemy`` and ``pyramid-cookiecutter-zodb`` are no longer supported. + Use ``pyramid-cookiecutter-starter`` going forward. + + coverage + 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. + + execution policy + A policy which wraps the :term:`router` by creating the request object + and sending it through the request pipeline. + See :class:`pyramid.config.Configurator.set_execution_policy`. + + singleton + A singleton is a class which will only ever have one instance. + As there is only one, it is shared by all other code. + This makes it an example of :term:`global state`. + + Using a singleton is `considered a poor design choice. <https://softwareengineering.stackexchange.com/questions/148108/why-is-global-state-so-evil>`_ + As :term:`mutable` global state, it can be changed by any other code, + and so the values it represents cannot be reasoned about or tested properly. + + global state + A set of values that are available to the entirety of a program. + + mutable + In Python, a value is mutable if it can be changed *in place*. + The Python ``list`` and ``dict`` types are mutable. + When a value is added to or removed from an instance of either, the original object remains. + The opposite of mutable is :term:`immutable`. + + immutable + In Python, a value is immutable if it cannot be changed. + The Python ``str``, ``int``, and ``tuple`` data types are all ``immutable``. + + import time + In Python, the moment when a module is referred to in an ``import`` statement. + At this moment, all statements in that module at the module scope (at the left margin) are executed. + It is a bad design decision to put statements in a Python module that have :term:`side effect`\ s at import time. + + side effect + A statement or function has a side effect when it changes a value outside its own scope. + Put another way, if one can observe the change made by a function from outside that function, it has a side effect. + + context manager + A context manager is an object that defines the runtime context to be established when executing a :ref:`with <python:with>` statement in Python. The context manager handles the entry into, and the exit from, the desired runtime context for the execution of the block of code. Context managers are normally invoked using the ``with`` statement, but can also be used by directly invoking their methods. Pyramid adds context managers for :class:`pyramid.config.Configurator`, :meth:`pyramid.interfaces.IRouter.request_context`, :func:`pyramid.paster.bootstrap`, :func:`pyramid.scripting.prepare`, and :func:`pyramid.testing.testConfig`. See also the Python documentation for :ref:`With Statement Context Managers <python:context-managers>` and :pep:`343`. + + Alembic + `Alembic <http://alembic.zzzcomputing.com/en/latest/>`_ is a lightweight database migration tool for usage with the SQLAlchemy Database Toolkit for Python. + + media type + A label representing the type of some content. + A media type is a nested structure containing a top-level type and a subtype. + Optionally, a media type can also contain parameters specific to the type. + See :rfc:`6838` for more information about media types. |
