The default request implementation
Parses a variety of Accept-* headers.
These headers generally take the form of:
value1; q=0.5, value2; q=0
Where the q parameter is optional. In theory other parameters exists, but this ignores them.
Represents a generic Accept-* style header.
This object should not be modified. To add items you can use accept_obj + 'accept_thing' to get a new object
Represents the Accept header, which is a list of mimetypes.
This class knows about mime wildcards, like image/*
Represents the Range header.
This only represents bytes ranges, which are the only kind specified in HTTP. This can represent multiple sets of ranges, but no place else is this multi-range facility supported.
Represents the Cache-Control header
Represents the Cache-Control header.
By giving a type of 'request' or 'response' you can control what attributes are allowed (some Cache-Control values only apply to requests or responses).
An object that represents the headers as present in a WSGI environment.
This object is a wrapper (with no internal state) for a WSGI request object, representing the CGI-style HTTP_* keys as a dictionary. Because a CGI environment can only hold one value for each key, this dictionary is single-valued (unlike outgoing headers).
Does parsing of ETag-related headers: If-None-Matches, If-Matches
Also If-Range parsing
Represents an ETag request. Supports containment to see if an ETag matches. You can also use etag_matcher.weak_contains(etag) to allow weak ETags to match (allowable for conditional GET requests, but not ranges or other methods).
Parses and represents the If-Range header, which can be an ETag or a date
Represents a WSGI response
Represents the Content-Range header
This header is start-stop/length, where start-stop and length can be * (represented as None in the attributes).
Represents the Cache-Control header.
By giving a type of 'request' or 'response' you can control what attributes are allowed (some Cache-Control values only apply to requests or responses).
Dictionary view on the response headerlist. Keys are normalized for case and whitespace.
HTML-escape a string or object
This converts any non-string objects passed into it to strings (actually, using unicode()). All values returned are non-unicode strings (using &#num; entities for all non-ASCII characters).
None is treated specially, and returns the empty string.
Wraps an app_iter, returning just a range of bytes
Gives a multi-value dictionary object (MultiDict) plus several wrappers
An ordered dictionary that can have multiple values for each key. Adds the methods getall, getone, mixed and extend and add to the normal dictionary interface.
A MultiDict wrapper that decodes returned values to unicode on the fly. Decoding is not applied to assigned values.
The key/value contents are assumed to be str/strs or str/FieldStorages (as is returned by the paste.request.parse_ functions).
Can optionally also decode keys when the decode_keys argument is True.
FieldStorage instances are cloned, and the clone’s filename variable is decoded. Its name variable is decoded when decode_keys is enabled.
Wraps several MultiDict objects, treating it as one large MultiDict
Represents no variables; used when no variables are applicable.
This is read-only
Represents the Cache-Control header
Dict that has a callback on all updates