package documentation

Undocumented

Module ​_api Undocumented
Module ​_auth No module docstring; 1/2 class documented
Module ​_client No module docstring; 0/1 variable, 0/4 constant, 3/5 classes documented
Module ​_compat The _compat module is used for code which requires branching between different Python environments. It is excluded from the code coverage checks.
Module ​_config No module docstring; 0/1 variable, 0/5 constant, 1/2 class documented
Module ​_content No module docstring; 2/8 functions, 1/3 class documented
Module ​_decoders Handlers for Content-Encoding.
Module ​_exceptions Our exception hierarchy:
Module ​_main Undocumented
Module ​_models Undocumented
Module ​_multipart No module docstring; 3/3 classes documented
Module ​_status​_codes Undocumented
Package ​_transports No package docstring; 1/5 module documented
Module ​_types Type definitions for type checking purposes.
Module ​_utils No module docstring; 0/3 variable, 0/5 constant, 10/19 functions, 1/4 class documented

From __init__.py:

Class ​ASGITransport A custom AsyncTransport that handles sending requests directly to an ASGI app. The simplest way to use this functionality is to use the app argument.
Class ​Async​Base​Transport Undocumented
Class ​Async​Byte​Stream Undocumented
Class ​Async​Client An asynchronous HTTP client, with connection pooling, HTTP/2, redirects, cookie persistence, etc.
Class ​Async​HTTPTransport Undocumented
Class ​Auth Base class for all authentication schemes.
Class ​Base​Transport No class docstring; 1/4 method documented
Class ​Basic​Auth Allows the 'auth' argument to be passed as a (username, password) pair, and uses HTTP Basic authentication.
Class ​Byte​Stream Undocumented
Class ​Client An HTTP client, with connection pooling, HTTP/2, redirects, cookie persistence, etc.
Class ​Close​Error Failed to close a connection.
Class codes HTTP status codes and reason phrases
Class ​Connect​Error Failed to establish a connection.
Class ​Connect​Timeout Timed out while connecting to the host.
Class ​Cookie​Conflict Attempted to lookup a cookie by name, but multiple cookies existed.
Class ​Cookies HTTP Cookies, as a mutable mapping.
Class ​Decoding​Error Decoding of the response failed, due to a malformed encoding.
Class ​Digest​Auth No class docstring; 0/2 instance variable, 0/1 constant, 1/7 method documented
Class ​Headers HTTP headers, as a case-insensitive multi-dict.
Class ​HTTPError Base class for RequestError and HTTPStatusError.
Class ​HTTPStatus​Error The response had an error HTTP status of 4xx or 5xx.
Class ​HTTPTransport Undocumented
Class ​Invalid​URL URL is improperly formed or cannot be parsed.
Class ​Limits Configuration for limits to various client behaviors.
Class ​Local​Protocol​Error A protocol was violated by the client.
Class ​Mock​Transport Undocumented
Class ​Network​Error The base class for network-related errors.
Class ​Pool​Timeout Timed out waiting to acquire a connection from the pool.
Class ​Protocol​Error The protocol was violated.
Class ​Proxy Undocumented
Class ​Proxy​Error An error occurred while establishing a proxy connection.
Class ​Query​Params URL query parameters, as a multi-dict.
Class ​Read​Error Failed to receive data from the network.
Class ​Read​Timeout Timed out while receiving data from the host.
Class ​Remote​Protocol​Error The protocol was violated by the server.
Class ​Request No class docstring; 0/1 property, 0/6 instance variable, 2/7 methods documented
Class ​Request​Error Base class for all exceptions that may occur when issuing a .request().
Class ​Request​Not​Read Attempted to access streaming request content, without having called read().
Class ​Response No class docstring; 14/20 properties, 0/14 instance variable, 12/23 methods documented
Class ​Response​Not​Read Attempted to access streaming response content, without having called read().
Class ​Stream​Closed Attempted to read or stream response content, but the request has been closed.
Class ​Stream​Consumed Attempted to read or stream content, but the content has already been streamed.
Class ​Stream​Error The base class for stream exceptions.
Class ​Sync​Byte​Stream No class docstring; 2/3 methods documented
Class ​Timeout Timeout configuration.
Class ​Timeout​Exception The base class for timeout errors.
Class ​Too​Many​Redirects Too many redirects.
Class ​Transport​Error Base class for all exceptions that occur at the level of the Transport API.
Class ​Unsupported​Protocol Attempted to make a request to an unsupported protocol.
Class URL url = httpx.URL("HTTPS://jo%40email.com:a%20secret@müller.de:1234/pa%20th?search=ab#anchorlink")
Class ​Write​Error Failed to send data through the network.
Class ​Write​Timeout Timed out while sending data to the host.
Class ​WSGITransport A custom transport that handles sending requests directly to an WSGI app. The simplest way to use this functionality is to use the app argument.
Function create​_ssl​_context Undocumented
Function delete Sends a DELETE request.
Function get Sends a GET request.
Function head Sends a HEAD request.
Function main Undocumented
Function options Sends an OPTIONS request.
Function patch Sends a PATCH request.
Function post Sends a POST request.
Function put Sends a PUT request.
Function request Sends an HTTP request.
Function stream Alternative to httpx.request() that streams the response body instead of loading it into memory at once.
Constant USE​_CLIENT​_DEFAULT Undocumented
Variable __description__ Undocumented
Variable __title__ Undocumented
Variable __version__ Undocumented
Variable __locals Undocumented
__version__: str =

Undocumented

__description__: str =

Undocumented

__title__: str =

Undocumented

def delete(url, *, params=None, headers=None, cookies=None, auth=None, proxies=None, follow_redirects=False, cert=None, verify=True, timeout=DEFAULT_TIMEOUT_CONFIG, trust_env=True):

Sends a DELETE request.

Parameters: See httpx.request.

Note that the data, files, and json parameters are not available on this function, as DELETE requests should not include a request body.

Parameters
url:URLTypesUndocumented
params:QueryParamTypesUndocumented
headers:HeaderTypesUndocumented
cookies:CookieTypesUndocumented
auth:AuthTypesUndocumented
proxies:ProxiesTypesUndocumented
follow​_redirects:boolUndocumented
cert:CertTypesUndocumented
verify:VerifyTypesUndocumented
timeout:TimeoutTypesUndocumented
trust​_env:boolUndocumented
Returns
ResponseUndocumented
def get(url, *, params=None, headers=None, cookies=None, auth=None, proxies=None, follow_redirects=False, cert=None, verify=True, timeout=DEFAULT_TIMEOUT_CONFIG, trust_env=True):

Sends a GET request.

Parameters: See httpx.request.

Note that the data, files, and json parameters are not available on this function, as GET requests should not include a request body.

Parameters
url:URLTypesUndocumented
params:QueryParamTypesUndocumented
headers:HeaderTypesUndocumented
cookies:CookieTypesUndocumented
auth:AuthTypesUndocumented
proxies:ProxiesTypesUndocumented
follow​_redirects:boolUndocumented
cert:CertTypesUndocumented
verify:VerifyTypesUndocumented
timeout:TimeoutTypesUndocumented
trust​_env:boolUndocumented
Returns
ResponseUndocumented
def head(url, *, params=None, headers=None, cookies=None, auth=None, proxies=None, follow_redirects=False, cert=None, verify=True, timeout=DEFAULT_TIMEOUT_CONFIG, trust_env=True):

Sends a HEAD request.

Parameters: See httpx.request.

Note that the data, files, and json parameters are not available on this function, as HEAD requests should not include a request body.

Parameters
url:URLTypesUndocumented
params:QueryParamTypesUndocumented
headers:HeaderTypesUndocumented
cookies:CookieTypesUndocumented
auth:AuthTypesUndocumented
proxies:ProxiesTypesUndocumented
follow​_redirects:boolUndocumented
cert:CertTypesUndocumented
verify:VerifyTypesUndocumented
timeout:TimeoutTypesUndocumented
trust​_env:boolUndocumented
Returns
ResponseUndocumented
def options(url, *, params=None, headers=None, cookies=None, auth=None, proxies=None, follow_redirects=False, cert=None, verify=True, timeout=DEFAULT_TIMEOUT_CONFIG, trust_env=True):

Sends an OPTIONS request.

Parameters: See httpx.request.

Note that the data, files, and json parameters are not available on this function, as OPTIONS requests should not include a request body.

Parameters
url:URLTypesUndocumented
params:QueryParamTypesUndocumented
headers:HeaderTypesUndocumented
cookies:CookieTypesUndocumented
auth:AuthTypesUndocumented
proxies:ProxiesTypesUndocumented
follow​_redirects:boolUndocumented
cert:CertTypesUndocumented
verify:VerifyTypesUndocumented
timeout:TimeoutTypesUndocumented
trust​_env:boolUndocumented
Returns
ResponseUndocumented
def patch(url, *, content=None, data=None, files=None, json=None, params=None, headers=None, cookies=None, auth=None, proxies=None, follow_redirects=False, cert=None, verify=True, timeout=DEFAULT_TIMEOUT_CONFIG, trust_env=True):

Sends a PATCH request.

Parameters: See httpx.request.

Parameters
url:URLTypesUndocumented
content:RequestContentUndocumented
data:RequestDataUndocumented
files:RequestFilesUndocumented
json:typing.AnyUndocumented
params:QueryParamTypesUndocumented
headers:HeaderTypesUndocumented
cookies:CookieTypesUndocumented
auth:AuthTypesUndocumented
proxies:ProxiesTypesUndocumented
follow​_redirects:boolUndocumented
cert:CertTypesUndocumented
verify:VerifyTypesUndocumented
timeout:TimeoutTypesUndocumented
trust​_env:boolUndocumented
Returns
ResponseUndocumented
def post(url, *, content=None, data=None, files=None, json=None, params=None, headers=None, cookies=None, auth=None, proxies=None, follow_redirects=False, cert=None, verify=True, timeout=DEFAULT_TIMEOUT_CONFIG, trust_env=True):

Sends a POST request.

Parameters: See httpx.request.

Parameters
url:URLTypesUndocumented
content:RequestContentUndocumented
data:RequestDataUndocumented
files:RequestFilesUndocumented
json:typing.AnyUndocumented
params:QueryParamTypesUndocumented
headers:HeaderTypesUndocumented
cookies:CookieTypesUndocumented
auth:AuthTypesUndocumented
proxies:ProxiesTypesUndocumented
follow​_redirects:boolUndocumented
cert:CertTypesUndocumented
verify:VerifyTypesUndocumented
timeout:TimeoutTypesUndocumented
trust​_env:boolUndocumented
Returns
ResponseUndocumented
def put(url, *, content=None, data=None, files=None, json=None, params=None, headers=None, cookies=None, auth=None, proxies=None, follow_redirects=False, cert=None, verify=True, timeout=DEFAULT_TIMEOUT_CONFIG, trust_env=True):

Sends a PUT request.

Parameters: See httpx.request.

Parameters
url:URLTypesUndocumented
content:RequestContentUndocumented
data:RequestDataUndocumented
files:RequestFilesUndocumented
json:typing.AnyUndocumented
params:QueryParamTypesUndocumented
headers:HeaderTypesUndocumented
cookies:CookieTypesUndocumented
auth:AuthTypesUndocumented
proxies:ProxiesTypesUndocumented
follow​_redirects:boolUndocumented
cert:CertTypesUndocumented
verify:VerifyTypesUndocumented
timeout:TimeoutTypesUndocumented
trust​_env:boolUndocumented
Returns
ResponseUndocumented
def request(method, url, *, params=None, content=None, data=None, files=None, json=None, headers=None, cookies=None, auth=None, proxies=None, timeout=DEFAULT_TIMEOUT_CONFIG, follow_redirects=False, verify=True, cert=None, trust_env=True):

Sends an HTTP request.

Parameters:

  • method - HTTP method for the new Request object: GET, OPTIONS,

HEAD, POST, PUT, PATCH, or DELETE. * url - URL for the new Request object. * params - (optional) Query parameters to include in the URL, as a string, dictionary, or sequence of two-tuples. * content - (optional) Binary content to include in the body of the request, as bytes or a byte iterator. * data - (optional) Form data to include in the body of the request, as a dictionary. * files - (optional) A dictionary of upload files to include in the body of the request. * json - (optional) A JSON serializable object to include in the body of the request. * headers - (optional) Dictionary of HTTP headers to include in the request. * cookies - (optional) Dictionary of Cookie items to include in the request. * auth - (optional) An authentication class to use when sending the request. * proxies - (optional) A dictionary mapping proxy keys to proxy URLs. * timeout - (optional) The timeout configuration to use when sending the request. * follow_redirects - (optional) Enables or disables HTTP redirects. * verify - (optional) SSL certificates (a.k.a CA bundle) used to verify the identity of requested hosts. Either True (default CA bundle), a path to an SSL certificate file, an ssl.SSLContext, or False (which will disable verification). * cert - (optional) An SSL certificate used by the requested host to authenticate the client. Either a path to an SSL certificate file, or two-tuple of (certificate file, key file), or a three-tuple of (certificate file, key file, password). * trust_env - (optional) Enables or disables usage of environment variables for configuration.

Returns: Response

Usage:

` >>> import httpx >>> response = httpx.request('GET', 'https://httpbin.org/get') >>> response <Response [200 OK]> `

Parameters
method:strUndocumented
url:URLTypesUndocumented
params:QueryParamTypesUndocumented
content:RequestContentUndocumented
data:RequestDataUndocumented
files:RequestFilesUndocumented
json:typing.AnyUndocumented
headers:HeaderTypesUndocumented
cookies:CookieTypesUndocumented
auth:AuthTypesUndocumented
proxies:ProxiesTypesUndocumented
timeout:TimeoutTypesUndocumented
follow​_redirects:boolUndocumented
verify:VerifyTypesUndocumented
cert:CertTypesUndocumented
trust​_env:boolUndocumented
Returns
ResponseUndocumented
@contextmanager
def stream(method, url, *, params=None, content=None, data=None, files=None, json=None, headers=None, cookies=None, auth=None, proxies=None, timeout=DEFAULT_TIMEOUT_CONFIG, follow_redirects=False, verify=True, cert=None, trust_env=True):

Alternative to httpx.request() that streams the response body instead of loading it into memory at once.

Parameters: See httpx.request.

See also: [Streaming Responses][0]

[0]: /quickstart#streaming-responses

Parameters
method:strUndocumented
url:URLTypesUndocumented
params:QueryParamTypesUndocumented
content:RequestContentUndocumented
data:RequestDataUndocumented
files:RequestFilesUndocumented
json:typing.AnyUndocumented
headers:HeaderTypesUndocumented
cookies:CookieTypesUndocumented
auth:AuthTypesUndocumented
proxies:ProxiesTypesUndocumented
timeout:TimeoutTypesUndocumented
follow​_redirects:boolUndocumented
verify:VerifyTypesUndocumented
cert:CertTypesUndocumented
trust​_env:boolUndocumented
Returns
typing.Iterator[Response]Undocumented
USE_CLIENT_DEFAULT =

Undocumented

Value
UseClientDefault()
def create_ssl_context(cert=None, verify=True, trust_env=True, http2=False):

Undocumented

Parameters
cert:CertTypesUndocumented
verify:VerifyTypesUndocumented
trust​_env:boolUndocumented
http2:boolUndocumented
Returns
ssl.SSLContextUndocumented
def main():

Undocumented

__locals =

Undocumented