contrib Package¶
console Module¶
-
restkit.contrib.console.as_bool(value)¶
-
restkit.contrib.console.external(cmd, data)¶
-
restkit.contrib.console.indent(mimetype, data)¶
-
restkit.contrib.console.indent_json(data)¶
-
restkit.contrib.console.indent_xml(data)¶
-
restkit.contrib.console.main()¶ function to manage restkit command line
-
restkit.contrib.console.options()¶ build command lines options
-
restkit.contrib.console.prettify(response, cli=True)¶
-
restkit.contrib.console.update_defaults(defaults)¶
ipython_shell Module¶
webob_api Module¶
Subclasses of webob.Request who use restkit to get a webob.Response via restkit.ext.wsgi_proxy.Proxy.
Example:
>>> req = Request.blank('http://pypi.python.org/pypi/restkit')
>>> resp = req.get_response()
>>> print resp
200 OK
Date: ...
Transfer-Encoding: chunked
Content-Type: text/html; charset=utf-8
Server: Apache/2...
<?xml version="1.0" encoding="UTF-8"?>
...
-
class
restkit.contrib.webob_api.Method(name)¶ Bases:
property
webob_helper Module¶
-
exception
restkit.contrib.webob_helper.WebobResourceError(msg=None, http_code=None, response=None)¶ Bases:
webob.exc.WSGIHTTPExceptionWrapper to return webob exceptions instead of restkit errors. Usefull for those who want to build WSGI applications speaking directly to others via HTTP.
To do it place somewhere in your application the function wrap_exceptions:
wrap_exceptions()
It will automatically replace restkit errors by webob exceptions.
-
message¶
-
status_int¶ The status as an integer
-
-
restkit.contrib.webob_helper.wrap_exceptions()¶ wrap restkit exception to return WebBob exceptions
wsgi_proxy Module¶
-
class
restkit.contrib.wsgi_proxy.HostProxy(uri, **kwargs)¶ Bases:
restkit.contrib.wsgi_proxy.ProxyA proxy to redirect all request to a specific uri
-
extract_uri(environ)¶
-
-
class
restkit.contrib.wsgi_proxy.Proxy(manager=None, allowed_methods=['GET', 'HEAD', 'POST', 'PUT', 'DELETE'], strip_script_name=True, **kwargs)¶ Bases:
objectA proxy wich redirect the request to SERVER_NAME:SERVER_PORT and send HTTP_HOST header
-
extract_uri(environ)¶
-
-
class
restkit.contrib.wsgi_proxy.TransparentProxy(manager=None, allowed_methods=['GET', 'HEAD', 'POST', 'PUT', 'DELETE'], strip_script_name=True, **kwargs)¶ Bases:
restkit.contrib.wsgi_proxy.ProxyA proxy based on HTTP_HOST environ variable
-
extract_uri(environ)¶
-
-
restkit.contrib.wsgi_proxy.get_config(local_config)¶ parse paste config
-
restkit.contrib.wsgi_proxy.make_host_proxy(global_config, uri=None, **local_config)¶ HostProxy entry_point
-
restkit.contrib.wsgi_proxy.make_proxy(global_config, **local_config)¶ TransparentProxy entry_point