Package gavo :: Package votable :: Module tapquery :: Class _FormData
[hide private]
[frames] | no frames]

Class _FormData

source code

     email.message.Message --+        
                             |        
      email.mime.base.MIMEBase --+    
                                 |    
email.mime.multipart.MIMEMultipart --+
                                     |
                                    _FormData

is a container for multipart/form-data encoded messages.

This is usually used for file uploads.

Instance Methods [hide private]
 
__init__(self)
Creates a multipart/* type message.
source code
 
addFile(self, paramName, fileName, data)
attaches the contents of fileName under the http parameter name paramName.
source code
 
addParam(self, paramName, paramVal)
adds a form parameter paramName with the (string) value paramVal
source code

Inherited from email.message.Message: __contains__, __delitem__, __getitem__, __len__, __setitem__, __str__, add_header, as_string, attach, del_param, get, get_all, get_boundary, get_charset, get_charsets, get_content_charset, get_content_maintype, get_content_subtype, get_content_type, get_default_type, get_filename, get_param, get_params, get_payload, get_unixfrom, has_key, is_multipart, items, keys, replace_header, set_boundary, set_charset, set_default_type, set_param, set_payload, set_type, set_unixfrom, values, walk

Inherited from email.message.Message (private): _get_params_preserve

Class Methods [hide private]
 
fromDict(cls, dict) source code
Method Details [hide private]

__init__(self)
(Constructor)

source code 

Creates a multipart/* type message.

By default, creates a multipart/mixed message, with proper Content-Type and MIME-Version headers.

_subtype is the subtype of the multipart content type, defaulting to `mixed'.

boundary is the multipart boundary string. By default it is calculated as needed.

_subparts is a sequence of initial subparts for the payload. It must be an iterable object, such as a list. You can always attach new subparts to the message by using the attach() method.

Additional parameters for the Content-Type header are taken from the keyword arguments (or passed into the _params argument).

Overrides: email.message.Message.__init__