util Module

class restkit.util.deprecated_property(decorator, attr, message, warning=True)

Bases: object

Wraps a decorator, with a deprecation warning or error

warn()
restkit.util.encode(v, charset='utf8')
restkit.util.http_date(timestamp=None)

Return the current date and time formatted for a message header.

restkit.util.locate_program(program)
restkit.util.make_uri(base, *args, **kwargs)

Assemble a uri based on a base, any number of path segments, and query string parameters.

restkit.util.parse_netloc(uri)
restkit.util.popen3(cmd, mode='t', bufsize=0)
restkit.util.replace_header(name, value, headers)
restkit.util.replace_headers(new_headers, headers)
restkit.util.rewrite_location(host_uri, location, prefix_path=None)
restkit.util.to_bytestring(s)
restkit.util.url_encode(obj, charset='utf8', encode_keys=False)
restkit.util.url_quote(s, charset='utf-8', safe='/:')

URL encode a single string with a given encoding.