class werkzeug.FileMultiDict(mapping=None)[source]

A special MultiDict that has convenience methods to add files to it. This is used for EnvironBuilder and generally useful for unittesting.

New in version 0.5.


add(key, value) Adds a new value for the key.
add_file(name, file[, filename, content_type]) Adds a new file to the dict.
clear(() -> None.  Remove all items from D.)
copy() Return a shallow copy of this object.
deepcopy([memo]) Return a deep copy of this object.
fromkeys(...) v defaults to None.
get(key[, default, type]) Return the default value if the requested data doesn’t exist.
getlist(key[, type]) Return the list of items for a given key.
has_key((k) -> True if D has a key k, else False)
items(*a, **kw) Like iteritems(), but returns a list.
iteritems([multi]) Return an iterator of (key, value) pairs.
iterlists() Return a list of (key, values) pairs, where values is the list of all values associated with the key.
iterlistvalues() Return an iterator of all values associated with a key.
itervalues() Returns an iterator of the first value on every key’s value list.
keys(*a, **kw) Like iterkeys(), but returns a list.
lists(*a, **kw) Like iterlists(), but returns a list.
listvalues(*a, **kw) Like iterlistvalues(), but returns a list.
pop(key[, default]) Pop the first item for a list on the dict.
popitem() Pop an item from the dict.
popitemlist() Pop a (key, list) tuple from the dict.
poplist(key) Pop the list for a key from the dict.
setdefault(key[, default]) Returns the value for the key if it is in the dict, otherwise it returns default and sets that value for key.
setlist(key, new_list) Remove the old values for a key and add new ones.
setlistdefault(key[, default_list]) Like setdefault but sets multiple values.
to_dict([flat]) Return the contents as regular dict.
update(other_dict) update() extends rather than replaces existing key lists:
values(*a, **kw) Like itervalues(), but returns a list.