documentation.misc

The misc module consists of several utility classes and functions that helped build Viverra. It's not really very interesting, but does have one or two helpful methods.

Type Coercion

Viverra provides two functions, force_int and force_unicode that ensure any data passed in is converted to the appropriate type -- useful for making sure that form or request parameters look as they are expected to, and can be dealt with properly by the application.

ListDict

Viverra also includes a ListDict class, modified from Armin Ronacher's original MultiDict (now part of Werkzeug) -- simply a dictionary that stores multiple values per key. This is particularly useful for form and header data, which allows multiple values for the same key.