четвер, 2 січня 2014 р.

Pyramid googlet

Pyramid Cookbook
Advanced Configuration
Deform - is a Python HTML form generation library. deform uses Colander as a schema library, Peppercorn as a form control deserialization library, and Chameleon to perform HTML templating.

pyramid.traversalTraversal walks down the path until it finds a published resource, analogous to a file system “directory” or “file”. The resource found as the result of a traversal becomes the context of the request. Then, the view lookup subsystem is used to find some view code willing to “publish” this resource by generating a responseTraversal is a concept stolen from Zope

  • find_interface - Return the first resource found in the lineage of resource which, a) if class_or_interface is a Python class object, is an instance of the class or any subclass of that class or b) if class_or_interface is a interface, provides the specified interface

lineageAn ordered sequence of objects based on a “location -aware” resource
tweenis a bit of code that sits between the Pyramid router’s main request handling function and the upstream WSGI component that uses Pyramid as its “app”. This is a feature that may be used by Pyramid framework extensions, to provide, for example, Pyramid-specific view timing support bookkeeping code that examines exceptions before they are returned to the upstream WSGI application.
zope.interface - Interfaces are objects that specify (document) the external behavior of objects that “provide” them. An interface specifies behavior through:
  • Informal documentation in a doc string
  • Attribute definitions
  • Invariants, which are conditions that must hold for objects that provide the interface

Attribute definitions specify specific attributes. They define the attribute name and provide documentation and constraints of attribute values. Attribute definitions can take a number of forms, as we’ll see below.
The Zope Object Database (ZODB) is an object-oriented database for transparently and persistently storing Python objects. It is included as part of the Zope web application server, but can also be used independently of Zope.
persistent This package contains a generic persistence implementation for Python. It forms the core protocol for making objects interact "transparently" with a database such as the ZODB.