Package restkit
[hide private]

Package restkit

source code


Version: 4.2.1

Submodules [hide private]

Functions [hide private]
 
set_logging(level, handler=None)
Set level of logging, and choose where to display/save logs (file or standard output).
source code
 
request(url, method='GET', body=None, headers=None, **kwargs)
Quick shortcut method to pass a request
source code
Variables [hide private]
  LOG_LEVELS = {'critical': 50, 'debug': 10, 'error': 40, 'info'...
  __package__ = 'restkit'
Function Details [hide private]

request(url, method='GET', body=None, headers=None, **kwargs)

source code 
Quick shortcut method to pass a request

:param url: str, url string
:param method: str, by default GET. http verbs
:param body: the body, could be a string, an iterator or a file-like object
:param headers: dict or list of tupple, http headers

Client parameters
~~~~~~~~~~~~~~~~~

:param follow_redirect: follow redirection, by default False
:param max_ollow_redirect: number of redirections available
:filters: http filters to pass
:param decompress: allows the client to decompress the response
body
:param max_status_line_garbage: defines the maximum number of ignorable
lines before we expect a HTTP response's status line. With
HTTP/1.1 persistent connections, the problem arises that broken
scripts could return a wrong Content-Length (there are more
bytes sent than specified).  Unfortunately, in some cases, this
cannot be detected after the bad response, but only before the
next one. So the client is abble to skip bad lines using this
limit. 0 disable garbage collection, None means unlimited number
of tries.
:param max_header_count:  determines the maximum HTTP header count
allowed. by default no limit.
:param manager: the manager to use. By default we use the global
one.
:parama response_class: the response class to use
:param timeout: the default timeout of the connection
(SO_TIMEOUT)

:param max_tries: the number of tries before we give up a
connection
:param wait_tries: number of time we wait between each tries.
:param ssl_args: ssl named arguments,
See http://docs.python.org/library/ssl.html informations


Variables Details [hide private]

LOG_LEVELS

Value:
{'critical': 50, 'debug': 10, 'error': 40, 'info': 20, 'warning': 30}