Register a method for processing requests.
Register a method as capable of processing GET/HEAD requests.
Register a method as capable of processing POST requests.
Register a method as capable of processing PUT requests.
Register a method as capable of processing DELETE requests.
Register a method for processing errors of a certain HTTP code.
Fetch a static file from the filesystem.
Return a compiled template.
Render a template with values of the context dictionary.
Simple HTTPServer that supports WSGI.
Run the Fiole web server.
Web Application.
Enable debugging: don’t catch internal server errors (500) and unhandled exceptions. (default: False)
Secret key used to sign secure cookies. (default: unset)
Directory where static files are located. (default: ./static)
The main handler. Dispatch to the user’s code.
Deal with the exception and present an error page.
Search through the methods registered.
Register a method for processing requests.
Register a method as capable of processing GET/HEAD requests.
Register a method as capable of processing POST requests.
Register a method as capable of processing PUT requests.
Register a method as capable of processing DELETE requests.
Register a method for processing errors of a certain HTTP code.
Return a signed string with timestamp.
Decode a signed string with timestamp or return None.
Fetch a static file from the filesystem.
An object to wrap the environ bits in a friendlier way.
Environment variables are also accessible through Request attributes.
Dictionary of environment variables
Path of the request, decoded and with / appended.
HTTP method (GET, POST, PUT, ...).
Read QUERY_STRING from the environment.
Read SCRIPT_NAME from the environment.
Build host URL.
An instance of EnvironHeaders which wraps HTTP headers.
Header "Content-Length" of the request as integer or 0.
A dictionary of GET parameters.
A dictionary of POST (or PUT) values, including files.
A dictionary of POST (or PUT) values, including files.
Content of the request.
A dictionary of Cookie.Morsel objects.
Get the value of the cookie with the given name, else default.
Return the given signed cookie if it validates, or None.
Build the absolute URL for an application path.
By default it builds the current request URL with leading and trailing / and no query string. The boolean argument full builds a full URL, incl. host.
Status code of the response as integer (default: 200)
Response headers as HTTPHeaders.
Set the given cookie name/value with the given options.
Delete the cookie with the given name.
Sign and timestamp a cookie so it cannot be forged.
Send the headers and return the body of the response.
An object that stores some headers.
An instance of HTTPHeaders is an iterable. It yields tuples (header_name, value). Additionally it provides a dict-like interface to access or change individual headers.
Access the header by name. This method is case-insensitive and the first matching header is returned. It returns None if the header does not exist.
Return the default value if the header doesn’t exist.
Return a list of all the values for the header.
Add a new header tuple to the list.
Remove all header tuples for key and add a new one.
Add a new header if not present. Return the value.
Convert the headers into a list.
Headers from a WSGI environment. Read-only view.
Access the header by name. This method is case-insensitive and returns None if the header does not exist.
Return the default value if the header doesn’t exist.
Return a list of all the values for the header.
Represent an Accept-style header.
Return True if the given offer is listed in the accepted types.
Return the quality of the given offer.
Return the best match in the sequence of offered types.
Base exception for HTTP errors.
Redirect the user to a different URL.
Assemble the template engine.
This mapping contains additional globals which are injected in the generated source. Two special globals are used internally and must not be modified: _r and _i. The functions str and escape (alias e) are also added here. They are used as filters. They can be replaced by C extensions for performance (see Webext). Any object can be added to this registry for usage in the templates, either as function or filter.
The list of filters which are applied to all template expressions {{ ... }}. Set to None to remove all default filters, for performance. (default: [‘str’])
Remove all compiled templates from the internal cache.
Return a compiled template.
The optional keyword argument default_filters overrides the setting which is configured on the Engine.
Remove given name from the internal cache.
Compile and return a template as module.
Simple template class.
Name of the template (it can be None).
Render the template with these arguments (either a dictionary or keyword arguments).
Load templates.
templates - a dict where key corresponds to template name and value to template content.
Directory where template files are located. (default: ./templates)
List all keys from internal dict.
Return template by name.
Tokenize input source per rules supplied.
Translate source into an iterable of tokens.
Include basic statements, variables processing and markup.
Translate source into an iterable of tokens.
If token is continue prepend it with end token so it simulates a closed block.
Process and yield groups of tokens.
A mapping of declared template filters (aliases of globals). This mapping can be extended. The globals can be extended too, see Engine.global_vars.
A mapping of tokens with list of methods, to generate the source code.
Add Python code to the source.
Compile the generated source code.