{
    "content": [
        {
            "type": "text",
            "text": "# httplib2 (pydoc)\n\n**Summary:** httplib2 - Small, fast HTTP client library for Python.\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **PACKAGE CONTENTS** (6 lines)\n- **CLASSES** (14 lines) — 9 subsections\n  - class FailedToDecompressContent (71 lines)\n  - class Http (94 lines)\n  - class HttpLib2Error (69 lines)\n  - class ProxyInfo (50 lines)\n  - class RedirectLimit (71 lines)\n  - class RedirectMissingLocation (71 lines)\n  - class Response (159 lines)\n  - class UnimplementedDigestAuthOptionError (71 lines)\n  - class UnimplementedHmacDigestAuthOptionError (71 lines)\n- **DATA** (7 lines)\n- **VERSION** (2 lines)\n- **AUTHOR** (2 lines)\n- **FILE** (3 lines)\n\n## Full Content\n\n### NAME\n\nhttplib2 - Small, fast HTTP client library for Python.\n\n### PACKAGE CONTENTS\n\nauth\ncerts\nerror\niri2uri\nsocks\n\n### CLASSES\n\nbuiltins.Exception(builtins.BaseException)\nhttplib2.error.HttpLib2Error\nbuiltins.dict(builtins.object)\nResponse\nbuiltins.object\nHttp\nProxyInfo\nhttplib2.error.HttpLib2ErrorWithResponse(httplib2.error.HttpLib2Error)\nhttplib2.error.FailedToDecompressContent\nhttplib2.error.RedirectLimit\nhttplib2.error.RedirectMissingLocation\nhttplib2.error.UnimplementedDigestAuthOptionError\nhttplib2.error.UnimplementedHmacDigestAuthOptionError\n\n#### class FailedToDecompressContent\n\n|  FailedToDecompressContent(desc, response, content)\n|\n|  Method resolution order:\n|      FailedToDecompressContent\n|      HttpLib2ErrorWithResponse\n|      HttpLib2Error\n|      builtins.Exception\n|      builtins.BaseException\n|      builtins.object\n|\n|  Methods inherited from HttpLib2ErrorWithResponse:\n|\n|  init(self, desc, response, content)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from HttpLib2Error:\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Static methods inherited from builtins.Exception:\n|\n|  new(*args, kwargs) from builtins.type\n|      Create and return a new object.  See help(type) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.BaseException:\n|\n|  delattr(self, name, /)\n|      Implement delattr(self, name).\n|\n|  getattribute(self, name, /)\n|      Return getattr(self, name).\n|\n|  reduce(...)\n|      Helper for pickle.\n|\n|  repr(self, /)\n|      Return repr(self).\n|\n|  setattr(self, name, value, /)\n|      Implement setattr(self, name, value).\n|\n|  setstate(...)\n|\n|  str(self, /)\n|      Return str(self).\n|\n|  withtraceback(...)\n|      Exception.withtraceback(tb) --\n|      set self.traceback to tb and return self.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from builtins.BaseException:\n|\n|  cause\n|      exception cause\n|\n|  context\n|      exception context\n|\n|  dict\n|\n|  suppresscontext\n|\n|  traceback\n|\n|  args\n\n#### class Http\n\n|  Http(cache=None, timeout=None, proxyinfo=<function proxyinfofromenvironment at 0x7f75bc0d95a0>, cacerts=None, disablesslcertificatevalidation=False, tlsmaximumversion=None, tlsminimumversion=None)\n|\n|  An HTTP client that handles:\n|\n|  - all methods\n|  - caching\n|  - ETags\n|  - compression,\n|  - HTTPS\n|  - Basic\n|  - Digest\n|  - WSSE\n|\n|  and more.\n|\n|  Methods defined here:\n|\n|  getstate(self)\n|\n|  init(self, cache=None, timeout=None, proxyinfo=<function proxyinfofromenvironment at 0x7f75bc0d95a0>, cacerts=None, disablesslcertificatevalidation=False, tlsmaximumversion=None, tlsminimumversion=None)\n|      If 'cache' is a string then it is used as a directory name for\n|      a disk cache. Otherwise it must be an object that supports the\n|      same interface as FileCache.\n|\n|      All timeouts are in seconds. If None is passed for timeout\n|      then Python's default timeout for sockets will be used. See\n|      for example the docs of socket.setdefaulttimeout():\n|      http://docs.python.org/library/socket.html#socket.setdefaulttimeout\n|\n|      `proxyinfo` may be:\n|        - a callable that takes the http scheme ('http' or 'https') and\n|          returns a ProxyInfo instance per request. By default, uses\n|          proxyinfofromenvironment.\n|        - a ProxyInfo instance (static proxy config).\n|        - None (proxy disabled).\n|\n|      cacerts is the path of a file containing root CA certificates for SSL\n|      server certificate validation.  By default, a CA cert file bundled with\n|      httplib2 is used.\n|\n|      If disablesslcertificatevalidation is true, SSL cert validation will\n|      not be performed.\n|\n|      tlsmaximumversion / tlsminimumversion require Python 3.7+ /\n|      OpenSSL 1.1.0g+. A value of \"TLSv13\" requires OpenSSL 1.1.1+.\n|\n|  setstate(self, state)\n|\n|  addcertificate(self, key, cert, domain, password=None)\n|      Add a key and cert that will be used\n|      any time a request requires authentication.\n|\n|  addcredentials(self, name, password, domain='')\n|      Add a name and password that will be used\n|      any time a request requires authentication.\n|\n|  clearcredentials(self)\n|      Remove all the names and passwords\n|      that are used for authentication\n|\n|  close(self)\n|      Close persistent connections, clear sensitive data.\n|      Not thread-safe, requires external synchronization against concurrent requests.\n|\n|  request(self, uri, method='GET', body=None, headers=None, redirections=5, connectiontype=None)\n|      Performs a single HTTP request.\n|      The 'uri' is the URI of the HTTP resource and can begin\n|      with either 'http' or 'https'. The value of 'uri' must be an absolute URI.\n|\n|      The 'method' is the HTTP method to perform, such as GET, POST, DELETE, etc.\n|      There is no restriction on the methods allowed.\n|\n|      The 'body' is the entity body to be sent with the request. It is a string\n|      object.\n|\n|      Any extra headers that are to be sent with the request should be provided in the\n|      'headers' dictionary.\n|\n|      The maximum number of redirect to follow before raising an\n|      exception is 'redirections. The default is 5.\n|\n|      The return value is a tuple of (response, content), the first\n|      being and instance of the 'Response' class, the second being\n|      a string that contains the response entity body.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors defined here:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n\n#### class HttpLib2Error\n\n|  # All exceptions raised here derive from HttpLib2Error\n|\n|  Method resolution order:\n|      HttpLib2Error\n|      builtins.Exception\n|      builtins.BaseException\n|      builtins.object\n|\n|  Data descriptors defined here:\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.Exception:\n|\n|  init(self, /, *args, kwargs)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Static methods inherited from builtins.Exception:\n|\n|  new(*args, kwargs) from builtins.type\n|      Create and return a new object.  See help(type) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.BaseException:\n|\n|  delattr(self, name, /)\n|      Implement delattr(self, name).\n|\n|  getattribute(self, name, /)\n|      Return getattr(self, name).\n|\n|  reduce(...)\n|      Helper for pickle.\n|\n|  repr(self, /)\n|      Return repr(self).\n|\n|  setattr(self, name, value, /)\n|      Implement setattr(self, name, value).\n|\n|  setstate(...)\n|\n|  str(self, /)\n|      Return str(self).\n|\n|  withtraceback(...)\n|      Exception.withtraceback(tb) --\n|      set self.traceback to tb and return self.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from builtins.BaseException:\n|\n|  cause\n|      exception cause\n|\n|  context\n|      exception context\n|\n|  dict\n|\n|  suppresscontext\n|\n|  traceback\n|\n|  args\n\n#### class ProxyInfo\n\n|  ProxyInfo(proxytype, proxyhost, proxyport, proxyrdns=True, proxyuser=None, proxypass=None, proxyheaders=None)\n|\n|  Collect information required to use a proxy.\n|\n|  Methods defined here:\n|\n|  init(self, proxytype, proxyhost, proxyport, proxyrdns=True, proxyuser=None, proxypass=None, proxyheaders=None)\n|      Args:\n|\n|      proxytype: The type of proxy server.  This must be set to one of\n|      socks.PROXYTYPEXXX constants.  For example:  p =\n|      ProxyInfo(proxytype=socks.PROXYTYPEHTTP, proxyhost='localhost',\n|      proxyport=8000)\n|      proxyhost: The hostname or IP address of the proxy server.\n|      proxyport: The port that the proxy server is running on.\n|      proxyrdns: If True (default), DNS queries will not be performed\n|      locally, and instead, handed to the proxy to resolve.  This is useful\n|      if the network does not allow resolution of non-local names. In\n|      httplib2 0.9 and earlier, this defaulted to False.\n|      proxyuser: The username used to authenticate with the proxy server.\n|      proxypass: The password used to authenticate with the proxy server.\n|      proxyheaders: Additional or modified headers for the proxy connect\n|      request.\n|\n|  repr(self)\n|      Return repr(self).\n|\n|  appliesto(self, hostname)\n|\n|  astuple(self)\n|\n|  bypasshost(self, hostname)\n|      Has this host been excluded from the proxy config\n|\n|  isgood(self)\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors defined here:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes defined here:\n|\n|  bypasshosts = ()\n\n#### class RedirectLimit\n\n|  RedirectLimit(desc, response, content)\n|\n|  Method resolution order:\n|      RedirectLimit\n|      HttpLib2ErrorWithResponse\n|      HttpLib2Error\n|      builtins.Exception\n|      builtins.BaseException\n|      builtins.object\n|\n|  Methods inherited from HttpLib2ErrorWithResponse:\n|\n|  init(self, desc, response, content)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from HttpLib2Error:\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Static methods inherited from builtins.Exception:\n|\n|  new(*args, kwargs) from builtins.type\n|      Create and return a new object.  See help(type) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.BaseException:\n|\n|  delattr(self, name, /)\n|      Implement delattr(self, name).\n|\n|  getattribute(self, name, /)\n|      Return getattr(self, name).\n|\n|  reduce(...)\n|      Helper for pickle.\n|\n|  repr(self, /)\n|      Return repr(self).\n|\n|  setattr(self, name, value, /)\n|      Implement setattr(self, name, value).\n|\n|  setstate(...)\n|\n|  str(self, /)\n|      Return str(self).\n|\n|  withtraceback(...)\n|      Exception.withtraceback(tb) --\n|      set self.traceback to tb and return self.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from builtins.BaseException:\n|\n|  cause\n|      exception cause\n|\n|  context\n|      exception context\n|\n|  dict\n|\n|  suppresscontext\n|\n|  traceback\n|\n|  args\n\n#### class RedirectMissingLocation\n\n|  RedirectMissingLocation(desc, response, content)\n|\n|  Method resolution order:\n|      RedirectMissingLocation\n|      HttpLib2ErrorWithResponse\n|      HttpLib2Error\n|      builtins.Exception\n|      builtins.BaseException\n|      builtins.object\n|\n|  Methods inherited from HttpLib2ErrorWithResponse:\n|\n|  init(self, desc, response, content)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from HttpLib2Error:\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Static methods inherited from builtins.Exception:\n|\n|  new(*args, kwargs) from builtins.type\n|      Create and return a new object.  See help(type) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.BaseException:\n|\n|  delattr(self, name, /)\n|      Implement delattr(self, name).\n|\n|  getattribute(self, name, /)\n|      Return getattr(self, name).\n|\n|  reduce(...)\n|      Helper for pickle.\n|\n|  repr(self, /)\n|      Return repr(self).\n|\n|  setattr(self, name, value, /)\n|      Implement setattr(self, name, value).\n|\n|  setstate(...)\n|\n|  str(self, /)\n|      Return str(self).\n|\n|  withtraceback(...)\n|      Exception.withtraceback(tb) --\n|      set self.traceback to tb and return self.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from builtins.BaseException:\n|\n|  cause\n|      exception cause\n|\n|  context\n|      exception context\n|\n|  dict\n|\n|  suppresscontext\n|\n|  traceback\n|\n|  args\n\n#### class Response\n\n|  Response(info)\n|\n|  An object more like email.message than httplib.HTTPResponse.\n|\n|  Method resolution order:\n|      Response\n|      builtins.dict\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  getattr(self, name)\n|\n|  init(self, info)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors defined here:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes defined here:\n|\n|  fromcache = False\n|\n|  previous = None\n|\n|  reason = 'Ok'\n|\n|  status = 200\n|\n|  version = 11\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.dict:\n|\n|  contains(self, key, /)\n|      True if the dictionary has the specified key, else False.\n|\n|  delitem(self, key, /)\n|      Delete self[key].\n|\n|  eq(self, value, /)\n|      Return self==value.\n|\n|  ge(self, value, /)\n|      Return self>=value.\n|\n|  getattribute(self, name, /)\n|      Return getattr(self, name).\n|\n|  getitem(...)\n|      x.getitem(y) <==> x[y]\n|\n|  gt(self, value, /)\n|      Return self>value.\n|\n|  ior(self, value, /)\n|      Return self|=value.\n|\n|  iter(self, /)\n|      Implement iter(self).\n|\n|  le(self, value, /)\n|      Return self<=value.\n|\n|  len(self, /)\n|      Return len(self).\n|\n|  lt(self, value, /)\n|      Return self<value.\n|\n|  ne(self, value, /)\n|      Return self!=value.\n|\n|  or(self, value, /)\n|      Return self|value.\n|\n|  repr(self, /)\n|      Return repr(self).\n|\n|  reversed(self, /)\n|      Return a reverse iterator over the dict keys.\n|\n|  ror(self, value, /)\n|      Return value|self.\n|\n|  setitem(self, key, value, /)\n|      Set self[key] to value.\n|\n|  sizeof(...)\n|      D.sizeof() -> size of D in memory, in bytes\n|\n|  clear(...)\n|      D.clear() -> None.  Remove all items from D.\n|\n|  copy(...)\n|      D.copy() -> a shallow copy of D\n|\n|  get(self, key, default=None, /)\n|      Return the value for key if key is in the dictionary, else default.\n|\n|  items(...)\n|      D.items() -> a set-like object providing a view on D's items\n|\n|  keys(...)\n|      D.keys() -> a set-like object providing a view on D's keys\n|\n|  pop(...)\n|      D.pop(k[,d]) -> v, remove specified key and return the corresponding value.\n|\n|      If the key is not found, return the default if given; otherwise,\n|      raise a KeyError.\n|\n|  popitem(self, /)\n|      Remove and return a (key, value) pair as a 2-tuple.\n|\n|      Pairs are returned in LIFO (last-in, first-out) order.\n|      Raises KeyError if the dict is empty.\n|\n|  setdefault(self, key, default=None, /)\n|      Insert key with a value of default if key is not in the dictionary.\n|\n|      Return the value for key if key is in the dictionary, else default.\n|\n|  update(...)\n|      D.update([E, ]F) -> None.  Update D from dict/iterable E and F.\n|      If E is present and has a .keys() method, then does:  for k in E: D[k] = E[k]\n|      If E is present and lacks a .keys() method, then does:  for k, v in E: D[k] = v\n|      In either case, this is followed by: for k in F:  D[k] = F[k]\n|\n|  values(...)\n|      D.values() -> an object providing a view on D's values\n|\n|  ----------------------------------------------------------------------\n|  Class methods inherited from builtins.dict:\n|\n|  classgetitem(...) from builtins.type\n|      See PEP 585\n|\n|  fromkeys(iterable, value=None, /) from builtins.type\n|      Create a new dictionary with keys from iterable and values set to value.\n|\n|  ----------------------------------------------------------------------\n|  Static methods inherited from builtins.dict:\n|\n|  new(*args, kwargs) from builtins.type\n|      Create and return a new object.  See help(type) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes inherited from builtins.dict:\n|\n|  hash = None\n\n#### class UnimplementedDigestAuthOptionError\n\n|  UnimplementedDigestAuthOptionError(desc, response, content)\n|\n|  Method resolution order:\n|      UnimplementedDigestAuthOptionError\n|      HttpLib2ErrorWithResponse\n|      HttpLib2Error\n|      builtins.Exception\n|      builtins.BaseException\n|      builtins.object\n|\n|  Methods inherited from HttpLib2ErrorWithResponse:\n|\n|  init(self, desc, response, content)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from HttpLib2Error:\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Static methods inherited from builtins.Exception:\n|\n|  new(*args, kwargs) from builtins.type\n|      Create and return a new object.  See help(type) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.BaseException:\n|\n|  delattr(self, name, /)\n|      Implement delattr(self, name).\n|\n|  getattribute(self, name, /)\n|      Return getattr(self, name).\n|\n|  reduce(...)\n|      Helper for pickle.\n|\n|  repr(self, /)\n|      Return repr(self).\n|\n|  setattr(self, name, value, /)\n|      Implement setattr(self, name, value).\n|\n|  setstate(...)\n|\n|  str(self, /)\n|      Return str(self).\n|\n|  withtraceback(...)\n|      Exception.withtraceback(tb) --\n|      set self.traceback to tb and return self.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from builtins.BaseException:\n|\n|  cause\n|      exception cause\n|\n|  context\n|      exception context\n|\n|  dict\n|\n|  suppresscontext\n|\n|  traceback\n|\n|  args\n\n#### class UnimplementedHmacDigestAuthOptionError\n\n|  UnimplementedHmacDigestAuthOptionError(desc, response, content)\n|\n|  Method resolution order:\n|      UnimplementedHmacDigestAuthOptionError\n|      HttpLib2ErrorWithResponse\n|      HttpLib2Error\n|      builtins.Exception\n|      builtins.BaseException\n|      builtins.object\n|\n|  Methods inherited from HttpLib2ErrorWithResponse:\n|\n|  init(self, desc, response, content)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from HttpLib2Error:\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Static methods inherited from builtins.Exception:\n|\n|  new(*args, kwargs) from builtins.type\n|      Create and return a new object.  See help(type) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.BaseException:\n|\n|  delattr(self, name, /)\n|      Implement delattr(self, name).\n|\n|  getattribute(self, name, /)\n|      Return getattr(self, name).\n|\n|  reduce(...)\n|      Helper for pickle.\n|\n|  repr(self, /)\n|      Return repr(self).\n|\n|  setattr(self, name, value, /)\n|      Implement setattr(self, name, value).\n|\n|  setstate(...)\n|\n|  str(self, /)\n|      Return str(self).\n|\n|  withtraceback(...)\n|      Exception.withtraceback(tb) --\n|      set self.traceback to tb and return self.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from builtins.BaseException:\n|\n|  cause\n|      exception cause\n|\n|  context\n|      exception context\n|\n|  dict\n|\n|  suppresscontext\n|\n|  traceback\n|\n|  args\n\n### DATA\n\nRETRIES = 2\nall = ['debuglevel', 'FailedToDecompressContent', 'Http', 'HttpLib...\ncontributors = ['Thomas Broyer (t.broyer@ltgt.net)', 'James Antill...\ncopyright = 'Copyright 2006, Joe Gregorio'\nlicense = 'MIT'\ndebuglevel = 0\n\n### VERSION\n\n0.20.2\n\n### AUTHOR\n\nJoe Gregorio (joe@bitworking.org)\n\n### FILE\n\n/usr/lib/python3/dist-packages/httplib2/init.py\n\n"
        }
    ],
    "structuredContent": {
        "command": "httplib2",
        "section": "",
        "mode": "pydoc",
        "summary": "httplib2 - Small, fast HTTP client library for Python.",
        "synopsis": null,
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "PACKAGE CONTENTS",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "CLASSES",
                "lines": 14,
                "subsections": [
                    {
                        "name": "class FailedToDecompressContent",
                        "lines": 71
                    },
                    {
                        "name": "class Http",
                        "lines": 94
                    },
                    {
                        "name": "class HttpLib2Error",
                        "lines": 69
                    },
                    {
                        "name": "class ProxyInfo",
                        "lines": 50
                    },
                    {
                        "name": "class RedirectLimit",
                        "lines": 71
                    },
                    {
                        "name": "class RedirectMissingLocation",
                        "lines": 71
                    },
                    {
                        "name": "class Response",
                        "lines": 159
                    },
                    {
                        "name": "class UnimplementedDigestAuthOptionError",
                        "lines": 71
                    },
                    {
                        "name": "class UnimplementedHmacDigestAuthOptionError",
                        "lines": 71
                    }
                ]
            },
            {
                "name": "DATA",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "VERSION",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "FILE",
                "lines": 3,
                "subsections": []
            }
        ]
    }
}