Python Paste


api


Attributes

a ACCEPT

<_MultiValueHeader Accept (RFC 2616, 14.1)>

Functions

f parse_request(environ, output_type=None, trusted=False, format=None) ...

Parses a WSGI request, attempting to get the given output type.

If trusted is true, then insecure formats will be allowed.

f parse_response(response, output_type, trusted=False, format=None) ...

Parses an HTTPResponse, attempting to get the given output type.

If trusted is true, then insecure formats will be allowed.

f get_mimetype_from_environ(environ, strip_params=False) ...

Get the mimetype from the WSGI environ

f get_mimetype_from_response(response, strip_params=False) ...

Get the mimetype from the HTTP response

f get_mimetype_from_headers(headers, strip_params=False) ...

Classes

C InsecureFormatError(...) ...

Raised when for some reason an insecure format is used in a non-trusted situation.

This class contains 2 members.

C Responder(...) ...

WSGI application that serves a specific piece of data. The data should not be mutated after creating this application.

You must either pass in the type of the data (a string) or a format object that you want to use. You can provide a default_format for use when the client doesn't pass in an Accept header.

This class contains 2 members.

See the source for more information.