Package pinder :: Module multipart

Module multipart

source code

Functions
 
is_iterable(x)
A implementation independent way of checking for iterables
source code
 
smart_str(s, encoding='utf-8', strings_only=False, errors='strict')
Returns a bytestring version of 's', encoded as specified in 'encoding'.
source code
 
encode_multipart(boundary, data)
Encodes multipart POST data from a dictionary of form values.
source code
 
guess_mime(filepath) source code
 
encode_file(boundary, key, file_) source code
Variables
  BOUNDARY = 'BoUnDaRyStRiNg'
  __package__ = 'pinder'
Function Details

smart_str(s, encoding='utf-8', strings_only=False, errors='strict')

source code 

Returns a bytestring version of 's', encoded as specified in 'encoding'.

If strings_only is True, don't convert (some) non-string-like objects.

encode_multipart(boundary, data)

source code 

Encodes multipart POST data from a dictionary of form values.

The key will be used as the form data name; the value will be transmitted as content. If the value is a file, the contents of the file will be guessed or sent as an application/octet-stream; otherwise, str(value) will be sent.