module documentation

Undocumented

Class Accept An :class:`Accept` object is just a list subclass for lists of ``(value, quality)`` tuples. It is automatically sorted by specificity and quality.
Class Authorization Represents an ``Authorization`` header sent by the client.
Class CallbackDict A dict that calls a function passed every time something is changed. The function is passed the dict instance.
Class CharsetAccept Like :class:`Accept` but with normalization for charsets.
Class CombinedMultiDict A read only :class:`MultiDict` that you can pass multiple :class:`MultiDict` instances as sequence and it will combine the return values of all wrapped dicts:
Class ContentRange Represents the content range header.
Class ContentSecurityPolicy Subclass of a dict that stores values for a Content Security Policy header. It has accessors for all the level 3 policies.
Class EnvironHeaders Read only version of the headers from a WSGI environment. This provides the same interface as `Headers` and is constructed from a WSGI environment.
Class ETags A set that can be used to check if one etag is present in a collection of etags.
Class FileMultiDict A special :class:`MultiDict` that has convenience methods to add files to it. This is used for :class:`EnvironBuilder` and generally useful for unittesting.
Class FileStorage The :class:`FileStorage` class is a thin wrapper over incoming files. It is used by the request object to represent uploaded files. All the attributes of the wrapper stream are proxied by the file storage so it's possible to do ``storage...
Class Headers An object that stores some headers. It has a dict-like interface, but is ordered, can store the same key multiple times, and iterating yields ``(key, value)`` pairs instead of only keys.
Class HeaderSet Similar to the :class:`ETags` class this implements a set-like structure. Unlike :class:`ETags` this is case insensitive and used for vary, allow, and content-language headers.
Class IfRange Very simple object that represents the `If-Range` header in parsed form. It will either have neither a etag or date or one of either but never both.
Class ImmutableDict An immutable :class:`dict`.
Class ImmutableDictMixin Makes a :class:`dict` immutable.
Class ImmutableHeadersMixin Makes a :class:`Headers` immutable. We do not mark them as hashable though since the only usecase for this datastructure in Werkzeug is a view on a mutable structure.
Class ImmutableList An immutable :class:`list`.
Class ImmutableListMixin Makes a :class:`list` immutable.
Class ImmutableMultiDict An immutable :class:`MultiDict`.
Class ImmutableMultiDictMixin Makes a :class:`MultiDict` immutable.
Class ImmutableOrderedMultiDict An immutable :class:`OrderedMultiDict`.
Class ImmutableTypeConversionDict Works like a :class:`TypeConversionDict` but does not support modifications.
Class LanguageAccept Like :class:`Accept` but with normalization for language tags.
Class MIMEAccept Like :class:`Accept` but with special methods and behavior for mimetypes.
Class MultiDict A :class:`MultiDict` is a dictionary subclass customized to deal with multiple values for the same key which is for example used by the parsing functions in the wrappers. This is necessary because some HTML form elements pass multiple values for the same key.
Class OrderedMultiDict Works like a regular :class:`MultiDict` but preserves the order of the fields. To convert the ordered multi dict into a list you can use the :meth:`items` method and pass it ``multi=True``.
Class Range Represents a ``Range`` header. All methods only support only bytes as the unit. Stores a list of ranges if given, but the methods only work if only one range is provided.
Class RequestCacheControl A cache control for requests. This is immutable and gives access to all the request-relevant cache control headers.
Class ResponseCacheControl A cache control for responses. Unlike :class:`RequestCacheControl` this is mutable and gives access to response-relevant cache control headers.
Class TypeConversionDict Works like a regular dict but the :meth:`get` method can perform type conversions. :class:`MultiDict` and :class:`CombinedMultiDict` are subclasses of this class and provide the same feature.
Class UpdateDictMixin Makes dicts call `self.on_update` on modifications.
Class WWWAuthenticate Provides simple access to `WWW-Authenticate` headers.
Function auth_property A static helper function for Authentication subclasses to add extra authentication system properties onto a class::
Function cache_control_property Return a new property object for a cache header. Useful if you want to add support for a cache extension in a subclass.
Function csp_property Return a new property object for a content security policy header. Useful if you want to add support for a csp extension in a subclass.
Function is_immutable Undocumented
Function iter_multi_items Iterates over the items of a mapping yielding keys and values without dropping any from more complex structures.
Class _CacheControl Subclass of a dict that stores values for a Cache-Control header. It has accessors for all the cache-control directives specified in RFC 2616. The class does not differentiate between request and response directives.
Class _omd_bucket Wraps values in the :class:`OrderedMultiDict`. This makes it possible to keep an order over multiple different keys. It requires a lot of extra memory and slows down access a lot, but makes it possible to access elements in O(1) and iterate in O(n).
Function _callback_property Undocumented
Function _calls_update Undocumented
Function _normalize_lang Process a language tag for matching.
Function _normalize_mime Undocumented
Function _options_header_vkw Undocumented
Function _set_property Undocumented
Function _unicodify_header_value Undocumented
Variable _locale_delim_re Undocumented
Variable _mime_split_re Undocumented
def auth_property(name, doc=None): (source)

A static helper function for Authentication subclasses to add extra authentication system properties onto a class:: class FooAuthenticate(WWWAuthenticate): special_realm = auth_property('special_realm') For more information have a look at the sourcecode to see how the regular properties (:attr:`realm` etc.) are implemented.

def cache_control_property(key, empty, type): (source)

Return a new property object for a cache header. Useful if you want to add support for a cache extension in a subclass. .. versionchanged:: 2.0 Renamed from ``cache_property``.

def csp_property(key): (source)

Return a new property object for a content security policy header. Useful if you want to add support for a csp extension in a subclass.

def is_immutable(self): (source)

Undocumented

def iter_multi_items(mapping): (source)

Iterates over the items of a mapping yielding keys and values without dropping any from more complex structures.

def _callback_property(name): (source)

Undocumented

def _calls_update(name): (source)

Undocumented

def _normalize_lang(value): (source)

Process a language tag for matching.

def _normalize_mime(value): (source)

Undocumented

def _options_header_vkw(value, kw): (source)

Undocumented

def _set_property(name, doc=None): (source)

Undocumented

def _unicodify_header_value(value): (source)

Undocumented

_locale_delim_re = (source)

Undocumented

_mime_split_re = (source)

Undocumented