forms Module

class restkit.forms.BoundaryItem(name, value, fname=None, filetype=None, filesize=None, quote=<function url_quote at 0x108fb7410>)

Bases: object

encode(boundary)

Returns the string encoding of this parameter

encode_hdr(boundary)

Returns the header of the encoding of this parameter

encode_unreadable_value(value)
iter_encode(boundary, blocksize=16384)
class restkit.forms.MultipartForm(params, boundary, headers, bitem_cls=<class 'restkit.forms.BoundaryItem'>, quote=<function url_quote at 0x108fb7410>)

Bases: object

get_size(recalc=False)
restkit.forms.form_encode(obj, charset='utf8')
restkit.forms.multipart_form_encode(params, headers, boundary, quote=<function url_quote at 0x108fb7410>)

Creates a tuple with MultipartForm instance as body and dict as headers

params
dict with fields for the body
headers
dict with fields for the header
boundary
string to use as boundary
quote (default: url_quote)
some callable expecting a string an returning a string. Use for quoting of boundary and form-data keys (names).

Previous topic

filters Module

Next topic

oauth2 Module

This Page