package documentation

Python HTTP library with thread-safe connection pooling, file post support, user friendly, and more

Module connection No module docstring; 0/2 variable, 0/2 constant, 0/2 function, 3/3 classes documented
Module connectionpool No module docstring; 0/3 variable, 1/1 function, 1/1 class documented
Package contrib No package docstring; 6/6 modules, 0/1 package documented
Module exceptions No module docstring; 37/37 exceptions documented
Module fields No module docstring; 0/1 constant, 3/4 functions, 1/1 class documented
Module filepost No module docstring; 0/1 variable, 3/3 functions documented
Package packages No package docstring; 1/1 module, 0/1 package documented
Module poolmanager No module docstring; 0/7 variable, 0/1 constant, 1/2 function, 2/2 classes documented
Module request No module docstring; 1/1 class documented
Module response No module docstring; 0/1 variable, 0/1 function, 1/5 class documented
Package util No package docstring; 0/2 variable, 0/6 constant, 8/8 functions, 1/1 class, 1/12 module documented
Module _collections No module docstring; 0/1 variable, 2/2 classes documented
Module _version Undocumented

From __init__.py:

Class HTTPConnectionPool Thread-safe connection pool for one host.
Class HTTPResponse HTTP Response container.
Class HTTPSConnectionPool Same as :class:`.HTTPConnectionPool`, but HTTPS.
Class Retry Retry configuration.
Class Timeout Timeout configuration.
Function add_stderr_logger Helper for quickly adding a StreamHandler to the logger. Useful for debugging.
Function connection_from_url Given a url, return an :class:`.ConnectionPool` instance of its host.
Function disable_warnings Helper for quickly disabling all urllib3 warnings.
Function encode_multipart_formdata Encode a dictionary of ``fields`` using the multipart/form-data MIME format.
Function get_host Deprecated. Use :func:`parse_url` instead.
Function make_headers Shortcuts for generating request headers.
Variable __author__ Undocumented
Variable __license__ Undocumented
def connection_from_url(url, **kw): (source)

Given a url, return an :class:`.ConnectionPool` instance of its host. This is a shortcut for not having to parse out the scheme, host, and port of the url before creating an :class:`.ConnectionPool` instance. :param url: Absolute URL string that must include the scheme. Port is optional. :param \**kw: Passes additional parameters to the constructor of the appropriate :class:`.ConnectionPool`. Useful for specifying things like timeout, maxsize, headers, etc. Example:: >>> conn = connection_from_url('http://google.com/') >>> r = conn.request('GET', '/')

def encode_multipart_formdata(fields, boundary=None): (source)

Encode a dictionary of ``fields`` using the multipart/form-data MIME format. :param fields: Dictionary of fields or list of (key, :class:`~urllib3.fields.RequestField`). :param boundary: If not specified, then a random boundary will be generated using :func:`urllib3.filepost.choose_boundary`.

def make_headers(keep_alive=None, accept_encoding=None, user_agent=None, basic_auth=None, proxy_basic_auth=None, disable_cache=None): (source)

Shortcuts for generating request headers. :param keep_alive: If ``True``, adds 'connection: keep-alive' header. :param accept_encoding: Can be a boolean, list, or string. ``True`` translates to 'gzip,deflate'. List will get joined by comma. String will be used as provided. :param user_agent: String representing the user-agent you want, such as "python-urllib3/0.6" :param basic_auth: Colon-separated username:password string for 'authorization: basic ...' auth header. :param proxy_basic_auth: Colon-separated username:password string for 'proxy-authorization: basic ...' auth header. :param disable_cache: If ``True``, adds 'cache-control: no-cache' header. Example:: >>> make_headers(keep_alive=True, user_agent="Batman/1.0") {'connection': 'keep-alive', 'user-agent': 'Batman/1.0'} >>> make_headers(accept_encoding=True) {'accept-encoding': 'gzip,deflate'}

def get_host(url): (source)

Deprecated. Use :func:`parse_url` instead.

__author__: str = (source)

Undocumented

__license__: str = (source)

Undocumented

def add_stderr_logger(level=logging.DEBUG): (source)

Helper for quickly adding a StreamHandler to the logger. Useful for debugging. Returns the handler after adding it.

def disable_warnings(category=exceptions.HTTPWarning): (source)

Helper for quickly disabling all urllib3 warnings.