Client.open(*args, **kwargs)[source]

Takes the same arguments as the EnvironBuilder class with some additions: You can provide a EnvironBuilder or a WSGI environment as only argument instead of the EnvironBuilder arguments and two optional keyword arguments (as_tuple, buffered) that change the type of the return value or the way the application is executed.

Changed in version 0.5: If a dict is provided as file in the dict for the data parameter the content type has to be called content_type now instead of mimetype. This change was made for consistency with werkzeug.FileWrapper.

The follow_redirects parameter was added to open().

Additional parameters:

  • as_tuple – Returns a tuple in the form (environ, result)
  • buffered – Set this to True to buffer the application run. This will automatically close the application for you as well.
  • follow_redirects – Set this to True if the Client should follow HTTP redirects.