Markdown Format | JSON API | MCP Server Tool
Help on package httplib2: NAME httplib2 - Small, fast HTTP client library for Python. PACKAGE CONTENTS auth certs error iri2uri socks CLASSES builtins.Exception(builtins.BaseException) httplib2.error.HttpLib2Error builtins.dict(builtins.object) Response builtins.object Http ProxyInfo httplib2.error.HttpLib2ErrorWithResponse(httplib2.error.HttpLib2Error) httplib2.error.FailedToDecompressContent httplib2.error.RedirectLimit httplib2.error.RedirectMissingLocation httplib2.error.UnimplementedDigestAuthOptionError httplib2.error.UnimplementedHmacDigestAuthOptionError class FailedToDecompressContent(HttpLib2ErrorWithResponse) | FailedToDecompressContent(desc, response, content) | | Method resolution order: | FailedToDecompressContent | HttpLib2ErrorWithResponse | HttpLib2Error | builtins.Exception | builtins.BaseException | builtins.object | | Methods inherited from HttpLib2ErrorWithResponse: | | __init__(self, desc, response, content) | Initialize self. See help(type(self)) for accurate signature. | | ---------------------------------------------------------------------- | Data descriptors inherited from HttpLib2Error: | | __weakref__ | list of weak references to the object (if defined) | | ---------------------------------------------------------------------- | Static methods inherited from builtins.Exception: | | __new__(*args, **kwargs) from builtins.type | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __delattr__(self, name, /) | Implement delattr(self, name). | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | Helper for pickle. | | __repr__(self, /) | Return repr(self). | | __setattr__(self, name, value, /) | Implement setattr(self, name, value). | | __setstate__(...) | | __str__(self, /) | Return str(self). | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args class Http(builtins.object) | Http(cache=None, timeout=None, proxy_info=<function proxy_info_from_environment at 0x7f07361515a0>, ca_certs=None, disable_ssl_certificate_validation=False, tls_maximum_version=None, tls_minimum_version=None) | | An HTTP client that handles: | | - all methods | - caching | - ETags | - compression, | - HTTPS | - Basic | - Digest | - WSSE | | and more. | | Methods defined here: | | __getstate__(self) | | __init__(self, cache=None, timeout=None, proxy_info=<function proxy_info_from_environment at 0x7f07361515a0>, ca_certs=None, disable_ssl_certificate_validation=False, tls_maximum_version=None, tls_minimum_version=None) | If 'cache' is a string then it is used as a directory name for | a disk cache. Otherwise it must be an object that supports the | same interface as FileCache. | | All timeouts are in seconds. If None is passed for timeout | then Python's default timeout for sockets will be used. See | for example the docs of socket.setdefaulttimeout(): | http://docs.python.org/library/socket.html#socket.setdefaulttimeout | | `proxy_info` may be: | - a callable that takes the http scheme ('http' or 'https') and | returns a ProxyInfo instance per request. By default, uses | proxy_info_from_environment. | - a ProxyInfo instance (static proxy config). | - None (proxy disabled). | | ca_certs is the path of a file containing root CA certificates for SSL | server certificate validation. By default, a CA cert file bundled with | httplib2 is used. | | If disable_ssl_certificate_validation is true, SSL cert validation will | not be performed. | | tls_maximum_version / tls_minimum_version require Python 3.7+ / | OpenSSL 1.1.0g+. A value of "TLSv1_3" requires OpenSSL 1.1.1+. | | __setstate__(self, state) | | add_certificate(self, key, cert, domain, password=None) | Add a key and cert that will be used | any time a request requires authentication. | | add_credentials(self, name, password, domain='') | Add a name and password that will be used | any time a request requires authentication. | | clear_credentials(self) | Remove all the names and passwords | that are used for authentication | | close(self) | Close persistent connections, clear sensitive data. | Not thread-safe, requires external synchronization against concurrent requests. | | request(self, uri, method='GET', body=None, headers=None, redirections=5, connection_type=None) | Performs a single HTTP request. | The 'uri' is the URI of the HTTP resource and can begin | with either 'http' or 'https'. The value of 'uri' must be an absolute URI. | | The 'method' is the HTTP method to perform, such as GET, POST, DELETE, etc. | There is no restriction on the methods allowed. | | The 'body' is the entity body to be sent with the request. It is a string | object. | | Any extra headers that are to be sent with the request should be provided in the | 'headers' dictionary. | | The maximum number of redirect to follow before raising an | exception is 'redirections. The default is 5. | | The return value is a tuple of (response, content), the first | being and instance of the 'Response' class, the second being | a string that contains the response entity body. | | ---------------------------------------------------------------------- | Data descriptors defined here: | | __dict__ | dictionary for instance variables (if defined) | | __weakref__ | list of weak references to the object (if defined) class HttpLib2Error(builtins.Exception) | # All exceptions raised here derive from HttpLib2Error | | Method resolution order: | HttpLib2Error | builtins.Exception | builtins.BaseException | builtins.object | | Data descriptors defined here: | | __weakref__ | list of weak references to the object (if defined) | | ---------------------------------------------------------------------- | Methods inherited from builtins.Exception: | | __init__(self, /, *args, **kwargs) | Initialize self. See help(type(self)) for accurate signature. | | ---------------------------------------------------------------------- | Static methods inherited from builtins.Exception: | | __new__(*args, **kwargs) from builtins.type | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __delattr__(self, name, /) | Implement delattr(self, name). | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | Helper for pickle. | | __repr__(self, /) | Return repr(self). | | __setattr__(self, name, value, /) | Implement setattr(self, name, value). | | __setstate__(...) | | __str__(self, /) | Return str(self). | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args class ProxyInfo(builtins.object) | ProxyInfo(proxy_type, proxy_host, proxy_port, proxy_rdns=True, proxy_user=None, proxy_pass=None, proxy_headers=None) | | Collect information required to use a proxy. | | Methods defined here: | | __init__(self, proxy_type, proxy_host, proxy_port, proxy_rdns=True, proxy_user=None, proxy_pass=None, proxy_headers=None) | Args: | | proxy_type: The type of proxy server. This must be set to one of | socks.PROXY_TYPE_XXX constants. For example: p = | ProxyInfo(proxy_type=socks.PROXY_TYPE_HTTP, proxy_host='localhost', | proxy_port=8000) | proxy_host: The hostname or IP address of the proxy server. | proxy_port: The port that the proxy server is running on. | proxy_rdns: If True (default), DNS queries will not be performed | locally, and instead, handed to the proxy to resolve. This is useful | if the network does not allow resolution of non-local names. In | httplib2 0.9 and earlier, this defaulted to False. | proxy_user: The username used to authenticate with the proxy server. | proxy_pass: The password used to authenticate with the proxy server. | proxy_headers: Additional or modified headers for the proxy connect | request. | | __repr__(self) | Return repr(self). | | applies_to(self, hostname) | | astuple(self) | | bypass_host(self, hostname) | Has this host been excluded from the proxy config | | isgood(self) | | ---------------------------------------------------------------------- | Data descriptors defined here: | | __dict__ | dictionary for instance variables (if defined) | | __weakref__ | list of weak references to the object (if defined) | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | bypass_hosts = () class RedirectLimit(HttpLib2ErrorWithResponse) | RedirectLimit(desc, response, content) | | Method resolution order: | RedirectLimit | HttpLib2ErrorWithResponse | HttpLib2Error | builtins.Exception | builtins.BaseException | builtins.object | | Methods inherited from HttpLib2ErrorWithResponse: | | __init__(self, desc, response, content) | Initialize self. See help(type(self)) for accurate signature. | | ---------------------------------------------------------------------- | Data descriptors inherited from HttpLib2Error: | | __weakref__ | list of weak references to the object (if defined) | | ---------------------------------------------------------------------- | Static methods inherited from builtins.Exception: | | __new__(*args, **kwargs) from builtins.type | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __delattr__(self, name, /) | Implement delattr(self, name). | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | Helper for pickle. | | __repr__(self, /) | Return repr(self). | | __setattr__(self, name, value, /) | Implement setattr(self, name, value). | | __setstate__(...) | | __str__(self, /) | Return str(self). | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args class RedirectMissingLocation(HttpLib2ErrorWithResponse) | RedirectMissingLocation(desc, response, content) | | Method resolution order: | RedirectMissingLocation | HttpLib2ErrorWithResponse | HttpLib2Error | builtins.Exception | builtins.BaseException | builtins.object | | Methods inherited from HttpLib2ErrorWithResponse: | | __init__(self, desc, response, content) | Initialize self. See help(type(self)) for accurate signature. | | ---------------------------------------------------------------------- | Data descriptors inherited from HttpLib2Error: | | __weakref__ | list of weak references to the object (if defined) | | ---------------------------------------------------------------------- | Static methods inherited from builtins.Exception: | | __new__(*args, **kwargs) from builtins.type | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __delattr__(self, name, /) | Implement delattr(self, name). | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | Helper for pickle. | | __repr__(self, /) | Return repr(self). | | __setattr__(self, name, value, /) | Implement setattr(self, name, value). | | __setstate__(...) | | __str__(self, /) | Return str(self). | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args class Response(builtins.dict) | Response(info) | | An object more like email.message than httplib.HTTPResponse. | | Method resolution order: | Response | builtins.dict | builtins.object | | Methods defined here: | | __getattr__(self, name) | | __init__(self, info) | Initialize self. See help(type(self)) for accurate signature. | | ---------------------------------------------------------------------- | Data descriptors defined here: | | __dict__ | dictionary for instance variables (if defined) | | __weakref__ | list of weak references to the object (if defined) | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | fromcache = False | | previous = None | | reason = 'Ok' | | status = 200 | | version = 11 | | ---------------------------------------------------------------------- | Methods inherited from builtins.dict: | | __contains__(self, key, /) | True if the dictionary has the specified key, else False. | | __delitem__(self, key, /) | Delete self[key]. | | __eq__(self, value, /) | Return self==value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getitem__(...) | x.__getitem__(y) <==> x[y] | | __gt__(self, value, /) | Return self>value. | | __ior__(self, value, /) | Return self|=value. | | __iter__(self, /) | Implement iter(self). | | __le__(self, value, /) | Return self<=value. | | __len__(self, /) | Return len(self). | | __lt__(self, value, /) | Return self<value. | | __ne__(self, value, /) | Return self!=value. | | __or__(self, value, /) | Return self|value. | | __repr__(self, /) | Return repr(self). | | __reversed__(self, /) | Return a reverse iterator over the dict keys. | | __ror__(self, value, /) | Return value|self. | | __setitem__(self, key, value, /) | Set self[key] to value. | | __sizeof__(...) | D.__sizeof__() -> size of D in memory, in bytes | | clear(...) | D.clear() -> None. Remove all items from D. | | copy(...) | D.copy() -> a shallow copy of D | | get(self, key, default=None, /) | Return the value for key if key is in the dictionary, else default. | | items(...) | D.items() -> a set-like object providing a view on D's items | | keys(...) | D.keys() -> a set-like object providing a view on D's keys | | pop(...) | D.pop(k[,d]) -> v, remove specified key and return the corresponding value. | | If the key is not found, return the default if given; otherwise, | raise a KeyError. | | popitem(self, /) | Remove and return a (key, value) pair as a 2-tuple. | | Pairs are returned in LIFO (last-in, first-out) order. | Raises KeyError if the dict is empty. | | setdefault(self, key, default=None, /) | Insert key with a value of default if key is not in the dictionary. | | Return the value for key if key is in the dictionary, else default. | | update(...) | D.update([E, ]**F) -> None. Update D from dict/iterable E and F. | If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] | If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v | In either case, this is followed by: for k in F: D[k] = F[k] | | values(...) | D.values() -> an object providing a view on D's values | | ---------------------------------------------------------------------- | Class methods inherited from builtins.dict: | | __class_getitem__(...) from builtins.type | See PEP 585 | | fromkeys(iterable, value=None, /) from builtins.type | Create a new dictionary with keys from iterable and values set to value. | | ---------------------------------------------------------------------- | Static methods inherited from builtins.dict: | | __new__(*args, **kwargs) from builtins.type | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes inherited from builtins.dict: | | __hash__ = None class UnimplementedDigestAuthOptionError(HttpLib2ErrorWithResponse) | UnimplementedDigestAuthOptionError(desc, response, content) | | Method resolution order: | UnimplementedDigestAuthOptionError | HttpLib2ErrorWithResponse | HttpLib2Error | builtins.Exception | builtins.BaseException | builtins.object | | Methods inherited from HttpLib2ErrorWithResponse: | | __init__(self, desc, response, content) | Initialize self. See help(type(self)) for accurate signature. | | ---------------------------------------------------------------------- | Data descriptors inherited from HttpLib2Error: | | __weakref__ | list of weak references to the object (if defined) | | ---------------------------------------------------------------------- | Static methods inherited from builtins.Exception: | | __new__(*args, **kwargs) from builtins.type | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __delattr__(self, name, /) | Implement delattr(self, name). | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | Helper for pickle. | | __repr__(self, /) | Return repr(self). | | __setattr__(self, name, value, /) | Implement setattr(self, name, value). | | __setstate__(...) | | __str__(self, /) | Return str(self). | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args class UnimplementedHmacDigestAuthOptionError(HttpLib2ErrorWithResponse) | UnimplementedHmacDigestAuthOptionError(desc, response, content) | | Method resolution order: | UnimplementedHmacDigestAuthOptionError | HttpLib2ErrorWithResponse | HttpLib2Error | builtins.Exception | builtins.BaseException | builtins.object | | Methods inherited from HttpLib2ErrorWithResponse: | | __init__(self, desc, response, content) | Initialize self. See help(type(self)) for accurate signature. | | ---------------------------------------------------------------------- | Data descriptors inherited from HttpLib2Error: | | __weakref__ | list of weak references to the object (if defined) | | ---------------------------------------------------------------------- | Static methods inherited from builtins.Exception: | | __new__(*args, **kwargs) from builtins.type | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __delattr__(self, name, /) | Implement delattr(self, name). | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | Helper for pickle. | | __repr__(self, /) | Return repr(self). | | __setattr__(self, name, value, /) | Implement setattr(self, name, value). | | __setstate__(...) | | __str__(self, /) | Return str(self). | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args DATA RETRIES = 2 __all__ = ['debuglevel', 'FailedToDecompressContent', 'Http', 'HttpLib... __contributors__ = ['Thomas Broyer (t.broyer AT ltgt.net)', 'James Antill... __copyright__ = 'Copyright 2006, Joe Gregorio' __license__ = 'MIT' debuglevel = 0 VERSION 0.20.2 AUTHOR Joe Gregorio (joe AT bitworking.org) FILE /usr/lib/python3/dist-packages/httplib2/__init__.py
Generated by phpMan Author: Che Dong Under GNU General Public License
2026-06-02 05:14 @216.73.216.198 CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)