Infrastructure for the action architecture.
“Action architecture” reflects the fact that in a dynamic web application, a single page is typically generated by putting together several different sources of information: database queries, template files, static data files, maybe some information from a cache, or something wacky and completely application-specific. Different properties combine in different ways - for instance, the modification time of a page is the latest modification time of any of the resources involved in creating it, the credentials required to access a protected page should be the union of the credentials required to access each resource, etc. etc. etc. Most web programming environments don’t seem to be designed with this architecture in mind; you can still see remnants (sometimes strong remnants) of the old static-file approach, where all the content and metadata come from one source, either a static file or a CGI script. In contrast, the action architecture lets you specify the content and properties of each resource individually, and the system takes care of putting them together.
Functions
| all_of(*cls) | Creates an Action subclass that passes requests to all given classes. |
| any_of(*cls, **kwargs) | Creates an Action subclass that passes requests to one of the given classes. |
| check_params(params) | Returns a tuple(list, dict) based on input params. |
| copy(x) | Shallow copy operation on arbitrary Python objects. |
| dirname(p) | Returns the directory component of a pathname |
| hash_iterable(iterable) | Computes a hash of an iterable based on the elements in the iterable. |
| isfile(path) | Test whether a path is a regular file |
| join(a, *p) | Join two or more pathname components, inserting ‘/’ as needed. |
| opt(cls) | Creates an Action subclass that wraps a given handler class to make it optional. |
| splitext(p) | Split the extension from a pathname. |
| validate_arguments(func, args, kwargs[, ...]) | Check if the function accepts the arguments and keyword arguments. |
Classes
| Action(req, params) | Represents an action that can be taken by the server. |
| ActionMetaclass | A metaclass that grants composition methods to the Action class itself. |
| AllActions(req, params) | |
| AnyAction(req, params) | |
| BaseRequest(environ[, populate_request, shallow]) | Very basic request object. |
| HashKey(req) | A surrogate key for objects which are not themselves hashable |
| OptAction(req, params) | |
| Request | |
| attribute_dict | |
| wrap_dict(parent) |
Exceptions
| ArgumentValidationError([missing, extra, ...]) | Raised if validate_arguments() fails to validate |
| InternalServerError([description]) | 500 Internal Server Error |
| NotFound([description]) | 404 Not Found |