Skip to content

API reference

Generated from the package. These are the objects you import from redc.

Client and response

Client

Client(base_url=None, read_buffer_size=16384, headers=None, persist_cookies=False, http_version='3', tls_version='default', tls_version_max='default', interface=None, unix_socket=None, ip_version='any', no_proxy=None, max_total_connections=1024, max_host_connections=64, max_idle_connections=2048, max_concurrent_streams=200, pool_min_size=16, pool_max_size=512, backend='asyncio', timeout=(30.0, 0.0), cert=None, verbose=None, raise_for_status=False, json_encoder=json_dumps, keep_alive=True)

RedC client for making HTTP requests

Initialize the RedC client

Examples:

>>> client = Client(base_url="https://example.com")
>>> response = await client.get("/api/data")

Parameters:

Name Type Description Default
base_url str

The base URL for the client. Default is None

None
read_buffer_size int

The read buffer size for libcurl. Must be greater than 1024 bytes. Default is 16384 (16KB)

16384
headers dict

Headers to include in every request. Default is None

None
persist_cookies bool

Whether to persist cookies across requests. Default is False

False
http_version `auto` | `1` | `1.1` | `2` | `3`, *optional*

Preferred HTTP version to attempt; libcurl may downgrade version as needed. Default is 3

'3'
tls_version `default` | `1.0` | `1.1` | `1.2` | `1.3`, *optional*

Minimum TLS version (this version or later). default leaves the floor to libcurl. Default is default

'default'
tls_version_max `default` | `1.0` | `1.1` | `1.2` | `1.3`, *optional*

Maximum TLS version. default leaves the cap to libcurl. Default is default

'default'
interface str

Local interface name or IP address for outgoing connections. if!, host!, and ifhost! prefixes are passed through to libcurl. A hostname triggers a blocking DNS lookup. Default is None

None
unix_socket str

Path of a Unix domain socket to connect to instead of the host in the URL. The URL still supplies the request path and Host header. Default is None

None
ip_version `any` | `4` | `6`, *optional*

Which addresses of a hostname may be used. A numeric address in the URL is used as written. Default is any

'any'
no_proxy str

Comma-separated hosts that skip proxy_url and connect directly. * skips the proxy for every host. "" proxies every host and ignores the no_proxy environment variable. None leaves that variable in effect. Default is None

None
max_total_connections int

The maximum number of active TCP connections allowed simultaneously. Set to 0 for unlimited. Default is 1024

1024
max_host_connections int

The maximum number of active connections allowed per specific host. Set to 0 for unlimited. Default is 64

64
max_idle_connections int

The maximum size of the network connection cache (Keep-Alive). These are TCP connections kept open for reuse after a request completes. Default is 2048

2048
max_concurrent_streams int

The maximum number of concurrent streams allowed per HTTP/2 or HTTP/3 connection. Default is 200

200
pool_min_size int

The number of internal request handles to pre-allocate during initialization to reduce startup latency. Default is 16

16
pool_max_size int

The maximum number of reusable request handles to retain in the pool. Excess handles created during high concurrency are destroyed rather than recycled. Default is 2048

512
backend `threaded` | `asyncio`, *optional*

Selects the execution backend used by RedC.

asyncio is lightweight and performs best for low to moderate concurrency, where only a small number of requests are active. In such scenarios, it often provides lower latency and better performance

threaded is optimized for higher concurrency and sustained load. While it may be less efficient for very small workloads, it generally achieves higher overall throughput (requests per second) as the number of concurrent requests increases

As a rule of thumb: - Low concurrency → asyncio - High concurrency → threaded

Default is asyncio

'asyncio'
timeout tuple

A tuple of (total_timeout, connect_timeout) in seconds. Default is (30.0, 0.0)

(30.0, 0.0)
cert str

Path to a CA certificate bundle file for SSL/TLS verification. Default is None (uses the trustifi CA bundle)

None
verbose bool

Force verbose output for all requests. Default is None

None
raise_for_status bool

If True, automatically raises an :class:redc.exceptions.HTTPError for responses with HTTP status codes indicating an error (i.e., 4xx or 5xx) or base :class:redc.exceptions.CurlError for CURL errors (e.g., network issues, timeouts). Default is False

False
json_encoder Callable

A callable for encoding JSON data. Default is :class:redc.utils.json_dumps

json_dumps
keep_alive bool

Whether to keep the underlying TCP connection alive after the request completes. When True, connections are reused for subsequent requests (default HTTP behavior). When False, the connection is closed immediately after the transfer. Default is True

True

Attributes

cookies property

cookies

Returns all stored session cookies as a dict

Returns:

Type Description

dict[str, str]

curl_version property

curl_version

Return current installed curl version info

default_headers property

default_headers

Returns default headers that are set on all requests

is_running property

is_running

Checks if RedC is currently running

Returns:

Type Description

bool: True if RedC is running, False otherwise

Methods:

clear_cookies

clear_cookies()

Clears all cookies from the current session

close

close()

Close the RedC client and free up resources.

This method must be called when the client is no longer needed to avoid memory leaks or unexpected behavior

delete

delete(url, params=None, headers=None, cookies=None, http_version=None, tls_version=None, tls_version_max=None, timeout=None, allow_redirects=True, proxy_url='', no_proxy=None, interface=None, unix_socket=None, ip_version=None, verify=True, auth=None, cert=None, stream_callback=None, progress_callback=None, verbose=False, keep_alive=None)

Make a DELETE request

Examples:

>>> response = await client.delete("/api/data/1", headers={"Authorization": "Bearer token"})

Parameters:

Name Type Description Default
url str

The URL to send the DELETE request to or path if base_url is specified in Client

required
params `dict[str, str]` | `tuple[str, str]` | `str` | `bytes`, *optional*

Query parameters to include in the request. Default is None

None
headers dict[str, str]

Headers to include in the request. Default is None

None
cookies dict[str, str]

Cookies to include in the request. Default is None

None
http_version `auto` | `1` | `1.1` | `2` | `3`, *optional*

Preferred HTTP version to attempt; libcurl may downgrade version as needed. Default is 3

None
tls_version `default` | `1.0` | `1.1` | `1.2` | `1.3`, *optional*

Minimum TLS version (this version or later). default leaves the floor to libcurl. When None, uses the client-level default. Default is None

None
tls_version_max `default` | `1.0` | `1.1` | `1.2` | `1.3`, *optional*

Maximum TLS version. default leaves the cap to libcurl. When None, uses the client-level default. Default is None

None
timeout tuple

A tuple of (total_timeout, connect_timeout) in seconds to override the default timeout. If None, the default timeout specified in Client is used.

None
allow_redirects `bool` | `int`, *optional*

Whether to follow HTTP redirects. True enables redirects with a default limit of 30. int sets a custom limit, False disables redirects. Default is True

True
proxy_url str

The proxy server URL to use for the request (e.g., http://user:pass@host:port).

''
no_proxy str

Comma-separated hosts that skip the proxy and connect directly. * skips the proxy for every host. "" proxies every host and ignores the no_proxy environment variable. When None, uses the client-level default. Default is None

None
interface str

Local interface name or IP address for outgoing connections. if!, host!, and ifhost! prefixes are passed through to libcurl. When None, uses the client-level default. "" does not bind for this request. Default is None

None
unix_socket str

Path of a Unix domain socket to connect to instead of the host in the URL. When None, uses the client-level default. "" uses a normal TCP connection. Default is None

None
ip_version `any` | `4` | `6`, *optional*

Which addresses of a hostname may be used. A numeric address in the URL is used as written. When None, uses the client-level default. Default is None

None
auth `tuple` | `str`, *optional*

A tuple of (username, password) or (username, password, type) for HTTP authentication or a string for Bearer authentication. Supported types are: basic, digest, digest_ie, ntlm and any. Default is basic

None
verify bool

Whether to verify SSL certificates. Default is True

True
cert str

Path to a CA certificate bundle file for SSL/TLS verification. Default is None, which uses the trustifi CA bundle

None
stream_callback (

class:redc.StreamCallback, optional): Callback for streaming response data. Default is None

required
progress_callback (

class:redc.ProgressCallback, optional): Callback for tracking upload and download progress. Default is None

required
verbose bool

Whether to enable verbose output for the request. Default is False

False
keep_alive bool

Whether to keep the underlying TCP connection alive after the request completes. When None, uses the client-level default. Default is None

None

Returns:

Type Description

class:redc.Response

get

get(url, params=None, headers=None, cookies=None, http_version=None, tls_version=None, tls_version_max=None, timeout=None, allow_redirects=True, proxy_url='', no_proxy=None, interface=None, unix_socket=None, ip_version=None, verify=True, auth=None, cert=None, stream_callback=None, progress_callback=None, verbose=False, keep_alive=None)

Make a GET request

Examples:

>>> response = await client.get("/api/data", headers={"Authorization": "Bearer token"})

Parameters:

Name Type Description Default
url str

The URL to send the GET request to or path if base_url is specified in Client

required
params `dict[str, str]` | `tuple[str, str]` | `str` | `bytes`, *optional*

Query parameters to include in the request. Default is None

None
headers dict[str, str]

Headers to include in the request. Default is None

None
cookies dict[str, str]

Cookies to include in the request. Default is None

None
http_version `auto` | `1` | `1.1` | `2` | `3`, *optional*

Preferred HTTP version to attempt; libcurl may downgrade version as needed. Default is 3

None
tls_version `default` | `1.0` | `1.1` | `1.2` | `1.3`, *optional*

Minimum TLS version (this version or later). default leaves the floor to libcurl. When None, uses the client-level default. Default is None

None
tls_version_max `default` | `1.0` | `1.1` | `1.2` | `1.3`, *optional*

Maximum TLS version. default leaves the cap to libcurl. When None, uses the client-level default. Default is None

None
timeout tuple

A tuple of (total_timeout, connect_timeout) in seconds to override the default timeout. If None, the default timeout specified in Client is used.

None
allow_redirects `bool` | `int`, *optional*

Whether to follow HTTP redirects. True enables redirects with a default limit of 30. int sets a custom limit, False disables redirects. Default is True

True
proxy_url str

The proxy server URL to use for the request (e.g., http://user:pass@host:port).

''
no_proxy str

Comma-separated hosts that skip the proxy and connect directly. * skips the proxy for every host. "" proxies every host and ignores the no_proxy environment variable. When None, uses the client-level default. Default is None

None
interface str

Local interface name or IP address for outgoing connections. if!, host!, and ifhost! prefixes are passed through to libcurl. When None, uses the client-level default. "" does not bind for this request. Default is None

None
unix_socket str

Path of a Unix domain socket to connect to instead of the host in the URL. When None, uses the client-level default. "" uses a normal TCP connection. Default is None

None
ip_version `any` | `4` | `6`, *optional*

Which addresses of a hostname may be used. A numeric address in the URL is used as written. When None, uses the client-level default. Default is None

None
auth `tuple` | `str`, *optional*

A tuple of (username, password) or (username, password, type) for HTTP authentication or a string for Bearer authentication. Supported types are: basic, digest, digest_ie, ntlm and any. Default is basic

None
verify bool

Whether to verify SSL certificates. Default is True

True
cert str

Path to a CA certificate bundle file for SSL/TLS verification. Default is None, which uses the trustifi CA bundle

None
stream_callback (

class:redc.StreamCallback, optional): Callback for streaming response data. Default is None

required
progress_callback (

class:redc.ProgressCallback, optional): Callback for tracking upload and download progress. Default is None

required
verbose bool

Whether to enable verbose output for the request. Default is False

False
keep_alive bool

Whether to keep the underlying TCP connection alive after the request completes. When None, uses the client-level default. Default is None

None

Returns:

Type Description

class:redc.Response

get_cookies

get_cookies(netscape=False)

Retrieves currently stored session cookies

Parameters:

Name Type Description Default
netscape bool

If True, returns raw Netscape-formatted strings; if False, returns dicts. Default is False

False

Returns:

Type Description
Union[list[dict], list[str]]

list[dict] | list[str]

head

head(url, params=None, headers=None, cookies=None, http_version=None, tls_version=None, tls_version_max=None, timeout=None, allow_redirects=True, proxy_url='', no_proxy=None, interface=None, unix_socket=None, ip_version=None, verify=True, auth=None, cert=None, verbose=False, keep_alive=None)

Make a HEAD request

Examples:

>>> response = await client.head("/api/data", headers={"Authorization": "Bearer token"})

Parameters:

Name Type Description Default
url str

The URL to send the HEAD request to or path if base_url is specified in Client

required
params `dict[str, str]` | `tuple[str, str]` | `str` | `bytes`, *optional*

Query parameters to include in the request. Default is None

None
headers dict[str, str]

Headers to include in the request. Default is None

None
cookies dict[str, str]

Cookies to include in the request. Default is None

None
http_version `auto` | `1` | `1.1` | `2` | `3`, *optional*

Preferred HTTP version to attempt; libcurl may downgrade version as needed. Default is 3

None
tls_version `default` | `1.0` | `1.1` | `1.2` | `1.3`, *optional*

Minimum TLS version (this version or later). default leaves the floor to libcurl. When None, uses the client-level default. Default is None

None
tls_version_max `default` | `1.0` | `1.1` | `1.2` | `1.3`, *optional*

Maximum TLS version. default leaves the cap to libcurl. When None, uses the client-level default. Default is None

None
timeout tuple

A tuple of (total_timeout, connect_timeout) in seconds to override the default timeout. If None, the default timeout specified in Client is used.

None
allow_redirects `bool` | `int`, *optional*

Whether to follow HTTP redirects. True enables redirects with a default limit of 30. int sets a custom limit, False disables redirects. Default is True

True
proxy_url str

The proxy server URL to use for the request (e.g., http://user:pass@host:port).

''
no_proxy str

Comma-separated hosts that skip the proxy and connect directly. * skips the proxy for every host. "" proxies every host and ignores the no_proxy environment variable. When None, uses the client-level default. Default is None

None
interface str

Local interface name or IP address for outgoing connections. if!, host!, and ifhost! prefixes are passed through to libcurl. When None, uses the client-level default. "" does not bind for this request. Default is None

None
unix_socket str

Path of a Unix domain socket to connect to instead of the host in the URL. When None, uses the client-level default. "" uses a normal TCP connection. Default is None

None
ip_version `any` | `4` | `6`, *optional*

Which addresses of a hostname may be used. A numeric address in the URL is used as written. When None, uses the client-level default. Default is None

None
auth `tuple` | `str`, *optional*

A tuple of (username, password) or (username, password, type) for HTTP authentication or a string for Bearer authentication. Supported types are: basic, digest, digest_ie, ntlm and any. Default is basic

None
verify bool

Whether to verify SSL certificates. Default is True

True
cert str

Path to a CA certificate bundle file for SSL/TLS verification. Default is None, which uses the trustifi CA bundle

None
verbose bool

Whether to enable verbose output for the request. Default is False

False
keep_alive bool

Whether to keep the underlying TCP connection alive after the request completes. When None, uses the client-level default. Default is None

None

Returns:

Type Description

class:redc.Response

options

options(url, params=None, headers=None, cookies=None, http_version=None, tls_version=None, tls_version_max=None, timeout=None, allow_redirects=True, proxy_url='', no_proxy=None, interface=None, unix_socket=None, ip_version=None, verify=True, auth=None, cert=None, verbose=False, keep_alive=None)

Make an OPTIONS request

Examples:

>>> response = await client.options("/api/data", headers={"Authorization": "Bearer token"})

Parameters:

Name Type Description Default
url str

The URL to send the OPTIONS request to or path if base_url is specified in Client

required
params `dict[str, str]` | `tuple[str, str]` | `str` | `bytes`, *optional*

Query parameters to include in the request. Default is None

None
headers dict[str, str]

Headers to include in the request. Default is None

None
cookies dict[str, str]

Cookies to include in the request. Default is None

None
http_version `auto` | `1` | `1.1` | `2` | `3`, *optional*

Preferred HTTP version to attempt; libcurl may downgrade version as needed. Default is 3

None
tls_version `default` | `1.0` | `1.1` | `1.2` | `1.3`, *optional*

Minimum TLS version (this version or later). default leaves the floor to libcurl. When None, uses the client-level default. Default is None

None
tls_version_max `default` | `1.0` | `1.1` | `1.2` | `1.3`, *optional*

Maximum TLS version. default leaves the cap to libcurl. When None, uses the client-level default. Default is None

None
timeout tuple

A tuple of (total_timeout, connect_timeout) in seconds to override the default timeout. If None, the default timeout specified in Client is used.

None
allow_redirects `bool` | `int`, *optional*

Whether to follow HTTP redirects. True enables redirects with a default limit of 30. int sets a custom limit, False disables redirects. Default is True

True
proxy_url str

The proxy server URL to use for the request (e.g., http://user:pass@host:port).

''
no_proxy str

Comma-separated hosts that skip the proxy and connect directly. * skips the proxy for every host. "" proxies every host and ignores the no_proxy environment variable. When None, uses the client-level default. Default is None

None
interface str

Local interface name or IP address for outgoing connections. if!, host!, and ifhost! prefixes are passed through to libcurl. When None, uses the client-level default. "" does not bind for this request. Default is None

None
unix_socket str

Path of a Unix domain socket to connect to instead of the host in the URL. When None, uses the client-level default. "" uses a normal TCP connection. Default is None

None
ip_version `any` | `4` | `6`, *optional*

Which addresses of a hostname may be used. A numeric address in the URL is used as written. When None, uses the client-level default. Default is None

None
auth `tuple` | `str`, *optional*

A tuple of (username, password) or (username, password, type) for HTTP authentication or a string for Bearer authentication. Supported types are: basic, digest, digest_ie, ntlm and any. Default is basic

None
verify bool

Whether to verify SSL certificates. Default is True

True
cert str

Path to a CA certificate bundle file for SSL/TLS verification. Default is None, which uses the trustifi CA bundle

None
verbose bool

Whether to enable verbose output for the request. Default is False

False
keep_alive bool

Whether to keep the underlying TCP connection alive after the request completes. When None, uses the client-level default. Default is None

None

Returns:

Type Description

class:redc.Response

patch

patch(url, params=None, json=None, data=None, files=None, headers=None, cookies=None, http_version=None, tls_version=None, tls_version_max=None, timeout=None, allow_redirects=True, proxy_url='', no_proxy=None, interface=None, unix_socket=None, ip_version=None, verify=True, auth=None, cert=None, stream_callback=None, progress_callback=None, verbose=False, keep_alive=None)

Make a PATCH request

Examples:

>>> response = await client.patch(
...     "/api/data/1",
...     json={"key": "updated_value"},
...     headers={"Authorization": "Bearer token"}
... )

Parameters:

Name Type Description Default
url str

The URL to send the PATCH request to or path if base_url is specified in Client

required
params `dict[str, str]` | `tuple[str, str]` | `str` | `bytes`, *optional*

Query parameters to include in the request. Default is None

None
json Any

JSON data to send in the request body. Default is None

None
data `dict` | `list[tuple]` | `bytes` | `str` | `BinaryIO`, *optional*

Data to send in the body of the Request. - If a dict or list of tuples: Sends as application/x-www-form-urlencoded. - If bytes or str: Sends as raw body. - If a file-like object (has readinto): Streams the data. - If files is provided, data constitutes the non-file fields of the multipart request. Default is None

None
files dict

Dictionary of name': file-val for multipart encoding upload. file-val can be - A string (file path). - bytes (file content). - A file-like object (stream). - A tuple in the format - ('filename', file-val) - ('filename', file-val, 'content_type') - ('filename', file-val, 'content_type', custom_headers) where custom_headers is a dict containing additional headers for the file part. Default is None

None
headers dict[str, str]

Headers to include in the request. Default is None

None
cookies dict[str, str]

Cookies to include in the request. Default is None

None
http_version `auto` | `1` | `1.1` | `2` | `3`, *optional*

Preferred HTTP version to attempt; libcurl may downgrade version as needed. Default is 3

None
tls_version `default` | `1.0` | `1.1` | `1.2` | `1.3`, *optional*

Minimum TLS version (this version or later). default leaves the floor to libcurl. When None, uses the client-level default. Default is None

None
tls_version_max `default` | `1.0` | `1.1` | `1.2` | `1.3`, *optional*

Maximum TLS version. default leaves the cap to libcurl. When None, uses the client-level default. Default is None

None
timeout tuple

A tuple of (total_timeout, connect_timeout) in seconds to override the default timeout. If None, the default timeout specified in Client is used.

None
allow_redirects `bool` | `int`, *optional*

Whether to follow HTTP redirects. True enables redirects with a default limit of 30. int sets a custom limit, False disables redirects. Default is True

True
proxy_url str

The proxy server URL to use for the request (e.g., http://user:pass@host:port).

''
no_proxy str

Comma-separated hosts that skip the proxy and connect directly. * skips the proxy for every host. "" proxies every host and ignores the no_proxy environment variable. When None, uses the client-level default. Default is None

None
interface str

Local interface name or IP address for outgoing connections. if!, host!, and ifhost! prefixes are passed through to libcurl. When None, uses the client-level default. "" does not bind for this request. Default is None

None
unix_socket str

Path of a Unix domain socket to connect to instead of the host in the URL. When None, uses the client-level default. "" uses a normal TCP connection. Default is None

None
ip_version `any` | `4` | `6`, *optional*

Which addresses of a hostname may be used. A numeric address in the URL is used as written. When None, uses the client-level default. Default is None

None
auth `tuple` | `str`, *optional*

A tuple of (username, password) or (username, password, type) for HTTP authentication or a string for Bearer authentication. Supported types are: basic, digest, digest_ie, ntlm and any. Default is basic

None
verify bool

Whether to verify SSL certificates. Default is True

True
cert str

Path to a CA certificate bundle file for SSL/TLS verification. Default is None, which uses the trustifi CA bundle

None
stream_callback (

class:redc.StreamCallback, optional): Callback for streaming response data. Default is None

required
progress_callback (

class:redc.ProgressCallback, optional): Callback for tracking upload and download progress. Default is None

required
verbose bool

Whether to enable verbose output for the request. Default is False

False
keep_alive bool

Whether to keep the underlying TCP connection alive after the request completes. When None, uses the client-level default. Default is None

None

Returns:

Type Description

class:redc.Response

post

post(url, params=None, json=None, data=None, files=None, headers=None, cookies=None, http_version=None, tls_version=None, tls_version_max=None, timeout=None, allow_redirects=True, proxy_url='', no_proxy=None, interface=None, unix_socket=None, ip_version=None, verify=True, auth=None, cert=None, stream_callback=None, progress_callback=None, verbose=False, keep_alive=None)

Make a POST request

Examples:

>>> response = await client.post(
...     "/api/data",
...     json={"key": "value"},
...     headers={"Authorization": "Bearer token"}
... )

Parameters:

Name Type Description Default
url str

The URL to send the POST request to or path if base_url is specified in Client

required
params `dict[str, str]` | `tuple[str, str]` | `str` | `bytes`, *optional*

Query parameters to include in the request. Default is None

None
json Any

JSON data to send in the request body. Default is None

None
data `dict` | `list[tuple]` | `bytes` | `str` | `BinaryIO`, *optional*

Data to send in the body of the Request. - If a dict or list of tuples: Sends as application/x-www-form-urlencoded. - If bytes or str: Sends as raw body. - If a file-like object (has readinto): Streams the data. - If files is provided, data constitutes the non-file fields of the multipart request. Default is None

None
files dict

Dictionary of name': file-val for multipart encoding upload. file-val can be - A string (file path). - bytes (file content). - A file-like object (stream). - A tuple in the format - ('filename', file-val) - ('filename', file-val, 'content_type') - ('filename', file-val, 'content_type', custom_headers) where custom_headers is a dict containing additional headers for the file part. Default is None

None
headers dict[str, str]

Headers to include in the request. Default is None

None
cookies dict[str, str]

Cookies to include in the request. Default is None

None
http_version `auto` | `1` | `1.1` | `2` | `3`, *optional*

Preferred HTTP version to attempt; libcurl may downgrade version as needed. Default is 3

None
tls_version `default` | `1.0` | `1.1` | `1.2` | `1.3`, *optional*

Minimum TLS version (this version or later). default leaves the floor to libcurl. When None, uses the client-level default. Default is None

None
tls_version_max `default` | `1.0` | `1.1` | `1.2` | `1.3`, *optional*

Maximum TLS version. default leaves the cap to libcurl. When None, uses the client-level default. Default is None

None
timeout tuple

A tuple of (total_timeout, connect_timeout) in seconds to override the default timeout. If None, the default timeout specified in Client is used.

None
allow_redirects `bool` | `int`, *optional*

Whether to follow HTTP redirects. True enables redirects with a default limit of 30. int sets a custom limit, False disables redirects. Default is True

True
proxy_url str

The proxy server URL to use for the request (e.g., http://user:pass@host:port).

''
no_proxy str

Comma-separated hosts that skip the proxy and connect directly. * skips the proxy for every host. "" proxies every host and ignores the no_proxy environment variable. When None, uses the client-level default. Default is None

None
interface str

Local interface name or IP address for outgoing connections. if!, host!, and ifhost! prefixes are passed through to libcurl. When None, uses the client-level default. "" does not bind for this request. Default is None

None
unix_socket str

Path of a Unix domain socket to connect to instead of the host in the URL. When None, uses the client-level default. "" uses a normal TCP connection. Default is None

None
ip_version `any` | `4` | `6`, *optional*

Which addresses of a hostname may be used. A numeric address in the URL is used as written. When None, uses the client-level default. Default is None

None
auth `tuple` | `str`, *optional*

A tuple of (username, password) or (username, password, type) for HTTP authentication or a string for Bearer authentication. Supported types are: basic, digest, digest_ie, ntlm and any. Default is basic

None
verify bool

Whether to verify SSL certificates. Default is True

True
cert str

Path to a CA certificate bundle file for SSL/TLS verification. Default is None, which uses the trustifi CA bundle

None
stream_callback (

class:redc.StreamCallback, optional): Callback for streaming response data. Default is None

required
progress_callback (

class:redc.ProgressCallback, optional): Callback for tracking upload and download progress. Default is None

required
verbose bool

Whether to enable verbose output for the request. Default is False

False
keep_alive bool

Whether to keep the underlying TCP connection alive after the request completes. When None, uses the client-level default. Default is None

None

Returns:

Type Description

class:redc.Response

put

put(url, params=None, json=None, data=None, files=None, headers=None, cookies=None, http_version=None, tls_version=None, tls_version_max=None, timeout=None, allow_redirects=True, proxy_url='', no_proxy=None, interface=None, unix_socket=None, ip_version=None, verify=True, auth=None, cert=None, stream_callback=None, progress_callback=None, verbose=False, keep_alive=None)

Make a PUT request

Examples:

>>> response = await client.put(
...     "/api/data/1",
...     json={"key": "new_value"},
...     headers={"Authorization": "Bearer token"}
... )

Parameters:

Name Type Description Default
url str

The URL to send the PUT request to or path if base_url is specified in Client

required
params `dict[str, str]` | `tuple[str, str]` | `str` | `bytes`, *optional*

Query parameters to include in the request. Default is None

None
json Any

JSON data to send in the request body. Default is None

None
data `dict` | `list[tuple]` | `bytes` | `str` | `BinaryIO`, *optional*

Data to send in the body of the Request. - If a dict or list of tuples: Sends as application/x-www-form-urlencoded. - If bytes or str: Sends as raw body. - If a file-like object (has readinto): Streams the data. - If files is provided, data constitutes the non-file fields of the multipart request. Default is None

None
files dict

Dictionary of name': file-val for multipart encoding upload. file-val can be - A string (file path). - bytes (file content). - A file-like object (stream). - A tuple in the format - ('filename', file-val) - ('filename', file-val, 'content_type') - ('filename', file-val, 'content_type', custom_headers) where custom_headers is a dict containing additional headers for the file part. Default is None

None
headers dict[str, str]

Headers to include in the request. Default is None

None
cookies dict[str, str]

Cookies to include in the request. Default is None

None
http_version `auto` | `1` | `1.1` | `2` | `3`, *optional*

Preferred HTTP version to attempt; libcurl may downgrade version as needed. Default is 3

None
tls_version `default` | `1.0` | `1.1` | `1.2` | `1.3`, *optional*

Minimum TLS version (this version or later). default leaves the floor to libcurl. When None, uses the client-level default. Default is None

None
tls_version_max `default` | `1.0` | `1.1` | `1.2` | `1.3`, *optional*

Maximum TLS version. default leaves the cap to libcurl. When None, uses the client-level default. Default is None

None
timeout tuple

A tuple of (total_timeout, connect_timeout) in seconds to override the default timeout. If None, the default timeout specified in Client is used.

None
allow_redirects `bool` | `int`, *optional*

Whether to follow HTTP redirects. True enables redirects with a default limit of 30. int sets a custom limit, False disables redirects. Default is True

True
proxy_url str

The proxy server URL to use for the request (e.g., http://user:pass@host:port).

''
no_proxy str

Comma-separated hosts that skip the proxy and connect directly. * skips the proxy for every host. "" proxies every host and ignores the no_proxy environment variable. When None, uses the client-level default. Default is None

None
interface str

Local interface name or IP address for outgoing connections. if!, host!, and ifhost! prefixes are passed through to libcurl. When None, uses the client-level default. "" does not bind for this request. Default is None

None
unix_socket str

Path of a Unix domain socket to connect to instead of the host in the URL. When None, uses the client-level default. "" uses a normal TCP connection. Default is None

None
ip_version `any` | `4` | `6`, *optional*

Which addresses of a hostname may be used. A numeric address in the URL is used as written. When None, uses the client-level default. Default is None

None
auth `tuple` | `str`, *optional*

A tuple of (username, password) or (username, password, type) for HTTP authentication or a string for Bearer authentication. Supported types are: basic, digest, digest_ie, ntlm and any. Default is basic

None
verify bool

Whether to verify SSL certificates. Default is True

True
cert str

Path to a CA certificate bundle file for SSL/TLS verification. Default is None, which uses the trustifi CA bundle

None
stream_callback (

class:redc.StreamCallback, optional): Callback for streaming response data. Default is None

required
progress_callback (

class:redc.ProgressCallback, optional): Callback for tracking upload and download progress. Default is None

required
verbose bool

Whether to enable verbose output for the request. Default is False

False
keep_alive bool

Whether to keep the underlying TCP connection alive after the request completes. When None, uses the client-level default. Default is None

None

Returns:

Type Description

class:redc.Response

request

request(method, url, params=None, json=None, data=None, files=None, headers=None, cookies=None, http_version=None, tls_version=None, tls_version_max=None, timeout=None, allow_redirects=True, proxy_url='', no_proxy=None, interface=None, unix_socket=None, ip_version=None, auth=None, verify=True, cert=None, stream_callback=None, progress_callback=None, verbose=False, keep_alive=None)

Make an HTTP request with the specified method and parameters

Examples:

>>> response = await client.request("GET", "/api/data", headers={"Authorization": "Bearer token"})

Parameters:

Name Type Description Default
method str

The HTTP method to use (e.g., "GET", "POST")

required
url str

The URL to send the request to or path if base_url is specified in Client

required
params `dict[str, str]` | `tuple[str, str]` | `str` | `bytes`, *optional*

Query parameters to include in the request. Default is None

None
json dict

JSON data to send in the request body. Default is None

None
data `dict` | `list[tuple]` | `bytes` | `str` | `BinaryIO`, *optional*

Data to send in the body of the Request. - If a dict or list of tuples: Sends as application/x-www-form-urlencoded. - If bytes or str: Sends as raw body. - If a file-like object (has readinto): Streams the data. - If files is provided, data constitutes the non-file fields of the multipart request. Default is None

None
files dict

Dictionary of name': file-val for multipart encoding upload. file-val can be - A string (file path). - bytes (file content). - A file-like object (stream). - A tuple in the format - ('filename', file-val) - ('filename', file-val, 'content_type') - ('filename', file-val, 'content_type', custom_headers) where custom_headers is a dict containing additional headers for the file part. Default is None

None
headers dict[str, str]

Headers to include in the request. Default is None

None
cookies dict[str, str]

Cookies to include in the request. Default is None

None
http_version `auto` | `1` | `1.1` | `2` | `3`, *optional*

Preferred HTTP version to attempt; libcurl may downgrade version as needed. Default is 3

None
tls_version `default` | `1.0` | `1.1` | `1.2` | `1.3`, *optional*

Minimum TLS version (this version or later). default leaves the floor to libcurl. When None, uses the client-level default. Default is None

None
tls_version_max `default` | `1.0` | `1.1` | `1.2` | `1.3`, *optional*

Maximum TLS version. default leaves the cap to libcurl. When None, uses the client-level default. Default is None

None
timeout tuple

A tuple of (total_timeout, connect_timeout) in seconds to override the default timeout. If None, the default timeout specified in Client is used.

None
allow_redirects `bool` | `int`, *optional*

Whether to follow HTTP redirects. True enables redirects with a default limit of 30. int sets a custom limit, False disables redirects. Default is True

True
proxy_url str

The proxy server URL to use for the request (e.g., http://user:pass@host:port).

''
no_proxy str

Comma-separated hosts that skip the proxy and connect directly. * skips the proxy for every host. "" proxies every host and ignores the no_proxy environment variable. When None, uses the client-level default. Default is None

None
interface str

Local interface name or IP address for outgoing connections. if!, host!, and ifhost! prefixes are passed through to libcurl. When None, uses the client-level default. "" does not bind for this request. Default is None

None
unix_socket str

Path of a Unix domain socket to connect to instead of the host in the URL. When None, uses the client-level default. "" uses a normal TCP connection. Default is None

None
ip_version `any` | `4` | `6`, *optional*

Which addresses of a hostname may be used. A numeric address in the URL is used as written. When None, uses the client-level default. Default is None

None
auth `tuple` | `str`, *optional*

A tuple of (username, password) or (username, password, type) for HTTP authentication or a string for Bearer authentication. Supported types are: basic, digest, digest_ie, ntlm and any. Default is basic

None
verify bool

Whether to verify SSL certificates. Default is True

True
cert str

Path to a CA certificate bundle file for SSL/TLS verification. Default is None, which uses the trustifi CA bundle

None
stream_callback (

class:redc.StreamCallback, optional): Callback for streaming response data. Default is None

required
progress_callback (

class:redc.ProgressCallback, optional): Callback for tracking upload and download progress. Default is None

required
verbose bool

Whether to enable verbose output for the request. Default is False

False
keep_alive bool

Whether to keep the underlying TCP connection alive after the request completes. When None, uses the client-level default. Default is None

None

Returns:

Type Description

class:redc.Response

Response

Response(status_code, headers, response, url, http_version, primary_ip, primary_port, local_ip, local_port, redirect_count, dns_time, connect_time, tls_time, first_byte_time, redirect_time, download_size, download_speed, upload_size, upload_speed, elapsed, curl_code, curl_error_message, verbose_output, raise_for_status=False)

Represents an HTTP response of RedC

Attributes

connect_time property

connect_time

TCP connect time in seconds

content property

content

Returns the raw response content

cookies property

cookies

Returns cookies set by the server (from Set-Cookie headers)

Collects cookies from all responses in the redirect chain. If multiple Set-Cookie headers set the same cookie name, the last value wins.

Returns:

Type Description

dict[str, str]

dns_time property

dns_time

DNS lookup time in seconds

elapsed property

elapsed

Elapsed time in seconds

first_byte_time property

first_byte_time

Time until the first response byte, in seconds, from the start of the transfer

is_permanent_redirect property

is_permanent_redirect

True if this response is a permanent redirect

is_redirect property

is_redirect

True if this response is a redirect

links

Returns the parsed Link HTTP header

Returns a list of dictionaries, where each dictionary contains the link target (url) and other parameters (e.g., rel, title)

Returns:

Type Description

list[dict] | None

ok property

ok

Checks if the request is successful and with no errors

reason property

reason

Returns the reason phrase for the HTTP status code

redirect_time property

redirect_time

Time spent following redirects before the final transfer, in seconds

text property

text

Decodes the response content as a string using UTF-8

Returns:

Type Description

str

tls_time property

tls_time

TLS handshake time in seconds

verbose property

verbose

Raw verbose/debug output from libcurl (only when verbose=True on the request)

Methods:

decode

decode(encoding)

Decodes the response content as a string using the specified encoding

Parameters:

Name Type Description Default
encoding str

The encoding to use for decoding

required

Returns:

Type Description
str

str

from_result classmethod

from_result(result, *, raise_for_status=False)

json

json()

Parses the response content as JSON

raise_for_status

raise_for_status()

Raises an :class:redc.exceptions.HTTPError or :class:redc.exceptions.CurlError if the response indicates an error

Callbacks

StreamCallback

StreamCallback(callback)

A class for creating a stream callback

A callback handler for streaming data

Examples:

>>> def callback(data: bytes, data_size: int):
...     print(f"Received {len(data)}")
>>> stream_callback = StreamCallback(callback)
>>> client.get("https://example.com/", stream_callback=stream_callback)

Parameters:

Name Type Description Default
callback Callable[[bytes, int], None]

A function that accepts two arguments: data (bytes) and data_size (int) The function cannot be asynchronous

required

ProgressCallback

ProgressCallback(callback)

A class for creating a progress callback

A callback handler for progress updates

Examples:

>>> def callback(dltotal: int, dlnow: int, ultotal: int, ulnow: int):
...     print(f"Downloaded {dlnow}/{dltotal}, Uploaded {ulnow}/{ultotal}")
>>> progress_callback = ProgressCallback(callback)
>>> client.get("https://example.com/", progress_callback=progress_callback)

Parameters:

Name Type Description Default
callback Callable[[int, int, int, int], None]

A function that accepts four arguments: - dltotal (int): Total bytes expected to be downloaded - dlnow (int): Bytes downloaded so far - ultotal (int): Total bytes expected to be uploaded - ulnow (int): Bytes uploaded so far The function cannot be asynchronous.

required

URL

CurlURL

CurlURL()

URL parser and builder backed by libcurl.

Examples:

>>> u = CurlURL("https://user:pass@example.com:8080/path?q=1#frag")
>>> u.host
    'example.com'
    >>> u.port
    8080
    >>> u.path
    '/path'
    >>> u.query = None
    >>> u["port"] = 443
    >>> str(u)
    'https://user:pass@example.com:443/path#frag'

Attributes:

Name Type Description
scheme str

URL scheme (e.g. http, https). Returns None if missing

user str

Username component of the URL. Returns None if missing

password str

Password component of the URL. Returns None if missing

options str

URL options component. Returns None if missing

host str

Hostname or IP address. Returns None if missing

zoneid str

IPv6 zone identifier. Returns None if missing

port int

Port number. Returns None if missing

path str

URL path. Returns None if missing

query str

Query string without ?. Returns None if missing

fragment str

Fragment without #. Returns None if missing

Notes
  • All components can be modified or removed by assigning None
  • Dict-style access is supported via u["host"] and assignment via u["port"] = 443

init(self) -> None init(self, url: str) -> None

Overloaded function.

  1. __init__(self) -> None

Create an empty URL object.

  1. __init__(self, url: str) -> None

Create and parse a URL.

Args: url (str): URL to parse

Attributes

fragment property

fragment

(self) -> object

host property

host

(self) -> object

options property

options

(self) -> object

password property

password

(self) -> object

path property

path

(self) -> object

port property

port

Port number.

Returns: int | None: The port number if present

query property

query

(self) -> object

scheme property

scheme

(self) -> object

user property

user

(self) -> object

zoneid property

zoneid

(self) -> object

Methods:

get method descriptor

get()

get(self, part: str, decode: bool = False, encode: bool = False, punycode: bool = False, empty: bool = False) -> object

Get a URL component dynamically.

Examples: >>> u.get("host") 'example.com' >>> u.get("path", decode=True)

Args: part (str): One of: scheme, user, password, options, host, zoneid, port, path, query, fragment

decode (bool, optional):
    Apply URL decoding. Default is `False`

encode (bool, optional):
    Apply URL encoding. Default is `False`

punycode (bool, optional):
    Convert host to punycode if applicable. Default is `False`

empty (bool, optional):
    Return empty strings instead of `None` when supported by libcurl. Default is `False`

Returns: str | int | None: The requested component

is_valid_url

is_valid_url(*args, **kwargs)

is_valid_url(url: str) -> bool

Check if a URL is valid.

Args: url (str): URL to validate

Returns: bool: True if the URL is valid, otherwise False

parts method descriptor

parts()

parts(self) -> dict

Return all URL components as a dictionary.

Returns: dict: Mapping of all URL parts to their values (None if missing)

reset method descriptor

reset()

reset(self, url: str) -> None

Replace the current URL.

Args: url (str): New URL to parse

Status phrases

HTTPStatus

Attributes

ACCEPTED class-attribute

ACCEPTED = 202

ALREADY_REPORTED class-attribute

ALREADY_REPORTED = 208

BAD_GATEWAY class-attribute

BAD_GATEWAY = 502

BAD_REQUEST class-attribute

BAD_REQUEST = 400

CONFLICT class-attribute

CONFLICT = 409

CONTINUE class-attribute

CONTINUE = 100

CREATED class-attribute

CREATED = 201

EARLY_HINTS class-attribute

EARLY_HINTS = 103

EXPECTATION_FAILED class-attribute

EXPECTATION_FAILED = 417

FAILED_DEPENDENCY class-attribute

FAILED_DEPENDENCY = 424

FORBIDDEN class-attribute

FORBIDDEN = 403

FOUND class-attribute

FOUND = 302

GATEWAY_TIMEOUT class-attribute

GATEWAY_TIMEOUT = 504

GONE class-attribute

GONE = 410

HTTP_VERSION_NOT_SUPPORTED class-attribute

HTTP_VERSION_NOT_SUPPORTED = 505

IM_A_TEAPOT class-attribute

IM_A_TEAPOT = 418

IM_USED class-attribute

IM_USED = 226

INSUFFICIENT_STORAGE class-attribute

INSUFFICIENT_STORAGE = 507

INTERNAL_SERVER_ERROR class-attribute

INTERNAL_SERVER_ERROR = 500

LENGTH_REQUIRED class-attribute

LENGTH_REQUIRED = 411

LOCKED class-attribute

LOCKED = 423

LOOP_DETECTED class-attribute

LOOP_DETECTED = 508

METHOD_NOT_ALLOWED class-attribute

METHOD_NOT_ALLOWED = 405

MISDIRECTED_REQUEST class-attribute

MISDIRECTED_REQUEST = 421

MOVED_PERMANENTLY class-attribute

MOVED_PERMANENTLY = 301

MULTIPLE_CHOICES class-attribute

MULTIPLE_CHOICES = 300

MULTI_STATUS class-attribute

MULTI_STATUS = 207

NETWORK_AUTHENTICATION_REQUIRED class-attribute

NETWORK_AUTHENTICATION_REQUIRED = 511

NON_AUTHORITATIVE_INFORMATION class-attribute

NON_AUTHORITATIVE_INFORMATION = 203

NOT_ACCEPTABLE class-attribute

NOT_ACCEPTABLE = 406

NOT_EXTENDED class-attribute

NOT_EXTENDED = 510

NOT_FOUND class-attribute

NOT_FOUND = 404

NOT_IMPLEMENTED class-attribute

NOT_IMPLEMENTED = 501

NOT_MODIFIED class-attribute

NOT_MODIFIED = 304

NO_CONTENT class-attribute

NO_CONTENT = 204

OK class-attribute

OK = 200

PARTIAL_CONTENT class-attribute

PARTIAL_CONTENT = 206

PAYLOAD_TOO_LARGE class-attribute

PAYLOAD_TOO_LARGE = 413

PAYMENT_REQUIRED class-attribute

PAYMENT_REQUIRED = 402

PERMANENT_REDIRECT class-attribute

PERMANENT_REDIRECT = 308

PRECONDITION_FAILED class-attribute

PRECONDITION_FAILED = 412

PRECONDITION_REQUIRED class-attribute

PRECONDITION_REQUIRED = 428

PROCESSING class-attribute

PROCESSING = 102

PROXY_AUTHENTICATION_REQUIRED class-attribute

PROXY_AUTHENTICATION_REQUIRED = 407

RANGE_NOT_SATISFIABLE class-attribute

RANGE_NOT_SATISFIABLE = 416

REQUEST_HEADER_FIELDS_TOO_LARGE class-attribute

REQUEST_HEADER_FIELDS_TOO_LARGE = 431

REQUEST_TIMEOUT class-attribute

REQUEST_TIMEOUT = 408

RESET_CONTENT class-attribute

RESET_CONTENT = 205

SEE_OTHER class-attribute

SEE_OTHER = 303

SERVICE_UNAVAILABLE class-attribute

SERVICE_UNAVAILABLE = 503

SWITCHING_PROTOCOLS class-attribute

SWITCHING_PROTOCOLS = 101

TEMPORARY_REDIRECT class-attribute

TEMPORARY_REDIRECT = 307

TOO_EARLY class-attribute

TOO_EARLY = 425

TOO_MANY_REQUESTS class-attribute

TOO_MANY_REQUESTS = 429

UNAUTHORIZED class-attribute

UNAUTHORIZED = 401
UNAVAILABLE_FOR_LEGAL_REASONS = 451

UNPROCESSABLE_ENTITY class-attribute

UNPROCESSABLE_ENTITY = 422

UNSUPPORTED_MEDIA_TYPE class-attribute

UNSUPPORTED_MEDIA_TYPE = 415

UPGRADE_REQUIRED class-attribute

UPGRADE_REQUIRED = 426

URI_TOO_LONG class-attribute

URI_TOO_LONG = 414

USE_PROXY class-attribute

USE_PROXY = 305

VARIANT_ALSO_NEGOTIATES class-attribute

VARIANT_ALSO_NEGOTIATES = 506

Methods:

get_description staticmethod

get_description(status_code)

Get the description of a status code

Errors

exceptions

RedC exceptions

Classes

HTTPError

HTTPError(status_code, message=None, response=None)

Bases: builtins.Exception

HTTP request returned an unsuccessful status code

Attributes
is_client_error property
is_client_error
is_server_error property
is_server_error

CurlError

CurlError(message=None, code=None)

Bases: builtins.Exception

Base class for all libcurl CURLcode errors

UnknownError

UnknownError(code, message=None)

Bases: redc.exceptions.CurlError

Unknown libcurl error code

Attributes
message class-attribute
message = 'Unknown libcurl error'

UnsupportedProtocolError

UnsupportedProtocolError(message=None, code=None)

Bases: redc.exceptions.CurlError

The URL you passed to libcurl used a protocol that this libcurl does not support. The support might be a compile-time option that you did not use, it can be a misspelled protocol string or just a protocol libcurl has no code for

Attributes
code class-attribute
code = 1
message class-attribute
message = 'The URL you passed to libcurl used a protocol that this libcurl does not support. The support might be a compile-time option that you did not use, it can be a misspelled protocol string or just a protocol libcurl has no code for'

FailedInitError

FailedInitError(message=None, code=None)

Bases: redc.exceptions.CurlError

Early initialization code failed. This is likely to be an internal error or problem, or a resource problem where something fundamental could not get done at init time

Attributes
code class-attribute
code = 2
message class-attribute
message = 'Early initialization code failed. This is likely to be an internal error or problem, or a resource problem where something fundamental could not get done at init time'

UrlMalformatError

UrlMalformatError(message=None, code=None)

Bases: redc.exceptions.CurlError

The URL was not properly formatted

Attributes
code class-attribute
code = 3
message class-attribute
message = 'The URL was not properly formatted'

NotBuiltInError

NotBuiltInError(message=None, code=None)

Bases: redc.exceptions.CurlError

A requested feature, protocol or option was not found built into this libcurl due to a build-time decision. This means that a feature or option was not enabled or explicitly disabled when libcurl was built and in order to get it to function you have to get a rebuilt libcurl

Attributes
code class-attribute
code = 4
message class-attribute
message = 'A requested feature, protocol or option was not found built into this libcurl due to a build-time decision. This means that a feature or option was not enabled or explicitly disabled when libcurl was built and in order to get it to function you have to get a rebuilt libcurl'

CouldntResolveProxyError

CouldntResolveProxyError(message=None, code=None)

Bases: redc.exceptions.CurlError

Could not resolve proxy. The given proxy host could not be resolved

Attributes
code class-attribute
code = 5
message class-attribute
message = 'Could not resolve proxy. The given proxy host could not be resolved'

CouldntResolveHostError

CouldntResolveHostError(message=None, code=None)

Bases: redc.exceptions.CurlError

Could not resolve host. The given remote host was not resolved

Attributes
code class-attribute
code = 6
message class-attribute
message = 'Could not resolve host. The given remote host was not resolved'

CouldntConnectError

CouldntConnectError(message=None, code=None)

Bases: redc.exceptions.CurlError

Failed to connect() to host or proxy

Attributes
code class-attribute
code = 7
message class-attribute
message = 'Failed to connect() to host or proxy'

WeirdServerReplyError

WeirdServerReplyError(message=None, code=None)

Bases: redc.exceptions.CurlError

The server sent data libcurl could not parse. This error code was known as CURLE_FTP_WEIRD_SERVER_REPLY before 7.51.0

Attributes
code class-attribute
code = 8
message class-attribute
message = 'The server sent data libcurl could not parse. This error code was known as CURLE_FTP_WEIRD_SERVER_REPLY before 7.51.0'

RemoteAccessDeniedError

RemoteAccessDeniedError(message=None, code=None)

Bases: redc.exceptions.CurlError

We were denied access to the resource given in the URL. For FTP, this occurs while trying to change to the remote directory

Attributes
code class-attribute
code = 9
message class-attribute
message = 'We were denied access to the resource given in the URL. For FTP, this occurs while trying to change to the remote directory'

FtpAcceptFailedError

FtpAcceptFailedError(message=None, code=None)

Bases: redc.exceptions.CurlError

While waiting for the server to connect back when an active FTP session is used, an error code was sent over the control connection or similar

Attributes
code class-attribute
code = 10
message class-attribute
message = 'While waiting for the server to connect back when an active FTP session is used, an error code was sent over the control connection or similar'

FtpWeirdPassReplyError

FtpWeirdPassReplyError(message=None, code=None)

Bases: redc.exceptions.CurlError

After having sent the FTP password to the server, libcurl expects a proper reply. This error code indicates that an unexpected code was returned

Attributes
code class-attribute
code = 11
message class-attribute
message = 'After having sent the FTP password to the server, libcurl expects a proper reply. This error code indicates that an unexpected code was returned'

FtpAcceptTimeoutError

FtpAcceptTimeoutError(message=None, code=None)

Bases: redc.exceptions.CurlError

During an active FTP session while waiting for the server to connect, the CURLOPT_ACCEPTTIMEOUT_MS (or the internal default) timeout expired

Attributes
code class-attribute
code = 12
message class-attribute
message = 'During an active FTP session while waiting for the server to connect, the [CURLOPT_ACCEPTTIMEOUT_MS](https://curl.se/libcurl/c/CURLOPT_ACCEPTTIMEOUT_MS.html) (or the internal default) timeout expired'

FtpWeirdPasvReplyError

FtpWeirdPasvReplyError(message=None, code=None)

Bases: redc.exceptions.CurlError

libcurl failed to get a sensible result back from the server as a response to either a PASV or an EPSV command. The server is flawed

Attributes
code class-attribute
code = 13
message class-attribute
message = 'libcurl failed to get a sensible result back from the server as a response to either a PASV or an EPSV command. The server is flawed'

FtpWeird227FormatError

FtpWeird227FormatError(message=None, code=None)

Bases: redc.exceptions.CurlError

FTP servers return a 227-line as a response to a PASV command. If libcurl fails to parse that line, this return code is passed back

Attributes
code class-attribute
code = 14
message class-attribute
message = 'FTP servers return a 227-line as a response to a PASV command. If libcurl fails to parse that line, this return code is passed back'

FtpCantGetHostError

FtpCantGetHostError(message=None, code=None)

Bases: redc.exceptions.CurlError

An internal failure to lookup the host used for the new connection

Attributes
code class-attribute
code = 15
message class-attribute
message = 'An internal failure to lookup the host used for the new connection'

Http2Error

Http2Error(message=None, code=None)

Bases: redc.exceptions.CurlError

A problem was detected in the HTTP2 framing layer. This is somewhat generic and can be one out of several problems, see the error buffer for details

Attributes
code class-attribute
code = 16
message class-attribute
message = 'A problem was detected in the HTTP2 framing layer. This is somewhat generic and can be one out of several problems, see the error buffer for details'

FtpCouldntSetTypeError

FtpCouldntSetTypeError(message=None, code=None)

Bases: redc.exceptions.CurlError

Received an error when trying to set the transfer mode to binary or ASCII

Attributes
code class-attribute
code = 17
message class-attribute
message = 'Received an error when trying to set the transfer mode to binary or ASCII'

PartialFileError

PartialFileError(message=None, code=None)

Bases: redc.exceptions.CurlError

A file transfer was shorter or larger than expected. This happens when the server first reports an expected transfer size, and then delivers data that does not match the previously given size

Attributes
code class-attribute
code = 18
message class-attribute
message = 'A file transfer was shorter or larger than expected. This happens when the server first reports an expected transfer size, and then delivers data that does not match the previously given size'

FtpCouldntRetrFileError

FtpCouldntRetrFileError(message=None, code=None)

Bases: redc.exceptions.CurlError

This was either a weird reply to a 'RETR' command or a zero byte transfer complete

Attributes
code class-attribute
code = 19
message class-attribute
message = "This was either a weird reply to a 'RETR' command or a zero byte transfer complete"

QuoteErrorError

QuoteErrorError(message=None, code=None)

Bases: redc.exceptions.CurlError

When sending custom "QUOTE" commands to the remote server, one of the commands returned an error code that was 400 or higher (for FTP) or otherwise indicated unsuccessful completion of the command

Attributes
code class-attribute
code = 21
message class-attribute
message = 'When sending custom "QUOTE" commands to the remote server, one of the commands returned an error code that was 400 or higher (for FTP) or otherwise indicated unsuccessful completion of the command'

HttpReturnedErrorError

HttpReturnedErrorError(message=None, code=None)

Bases: redc.exceptions.CurlError

This is returned if CURLOPT_FAILONERROR is set TRUE and the HTTP server returns an error code that is >= 400

Attributes
code class-attribute
code = 22
message class-attribute
message = 'This is returned if [CURLOPT_FAILONERROR](https://curl.se/libcurl/c/CURLOPT_FAILONERROR.html) is set TRUE and the HTTP server returns an error code that is >= 400'

WriteErrorError

WriteErrorError(message=None, code=None)

Bases: redc.exceptions.CurlError

An error occurred when writing received data to a local file, or an error was returned to libcurl from a write callback

Attributes
code class-attribute
code = 23
message class-attribute
message = 'An error occurred when writing received data to a local file, or an error was returned to libcurl from a write callback'

UploadFailedError

UploadFailedError(message=None, code=None)

Bases: redc.exceptions.CurlError

Failed starting the upload. For FTP, the server typically denied the STOR command. The error buffer usually contains the server's explanation for this

Attributes
code class-attribute
code = 25
message class-attribute
message = "Failed starting the upload. For FTP, the server typically denied the STOR command. The error buffer usually contains the server's explanation for this"

ReadErrorError

ReadErrorError(message=None, code=None)

Bases: redc.exceptions.CurlError

There was a problem reading a local file or an error returned by the read callback

Attributes
code class-attribute
code = 26
message class-attribute
message = 'There was a problem reading a local file or an error returned by the read callback'

OutOfMemoryError

OutOfMemoryError(message=None, code=None)

Bases: redc.exceptions.CurlError

A memory allocation request failed. This is serious badness and things are severely screwed up if this ever occurs

Attributes
code class-attribute
code = 27
message class-attribute
message = 'A memory allocation request failed. This is serious badness and things are severely screwed up if this ever occurs'

OperationTimedoutError

OperationTimedoutError(message=None, code=None)

Bases: redc.exceptions.CurlError

Operation timeout. The specified time-out period was reached according to the conditions

Attributes
code class-attribute
code = 28
message class-attribute
message = 'Operation timeout. The specified time-out period was reached according to the conditions'

FtpPortFailedError

FtpPortFailedError(message=None, code=None)

Bases: redc.exceptions.CurlError

The FTP PORT command returned error. This mostly happens when you have not specified a good enough address for libcurl to use. See CURLOPT_FTPPORT

Attributes
code class-attribute
code = 30
message class-attribute
message = 'The FTP PORT command returned error. This mostly happens when you have not specified a good enough address for libcurl to use. See [CURLOPT_FTPPORT](https://curl.se/libcurl/c/CURLOPT_FTPPORT.html)'

FtpCouldntUseRestError

FtpCouldntUseRestError(message=None, code=None)

Bases: redc.exceptions.CurlError

The FTP REST command returned error. This should never happen if the server is sane

Attributes
code class-attribute
code = 31
message class-attribute
message = 'The FTP REST command returned error. This should never happen if the server is sane'

RangeErrorError

RangeErrorError(message=None, code=None)

Bases: redc.exceptions.CurlError

The server does not support or accept range requests

Attributes
code class-attribute
code = 33
message class-attribute
message = 'The server does not support or accept range requests'

SslConnectErrorError

SslConnectErrorError(message=None, code=None)

Bases: redc.exceptions.CurlError

A problem occurred somewhere in the SSL/TLS handshake. You really want the error buffer and read the message there as it pinpoints the problem slightly more. Could be certificates (file formats, paths, permissions), passwords, and others

Attributes
code class-attribute
code = 35
message class-attribute
message = 'A problem occurred somewhere in the SSL/TLS handshake. You really want the error buffer and read the message there as it pinpoints the problem slightly more. Could be certificates (file formats, paths, permissions), passwords, and others'

BadDownloadResumeError

BadDownloadResumeError(message=None, code=None)

Bases: redc.exceptions.CurlError

The download could not be resumed because the specified offset was out of the file boundary

Attributes
code class-attribute
code = 36
message class-attribute
message = 'The download could not be resumed because the specified offset was out of the file boundary'

FileCouldntReadFileError

FileCouldntReadFileError(message=None, code=None)

Bases: redc.exceptions.CurlError

A file given with FILE:// could not be opened. Most likely because the file path does not identify an existing file. Did you check file permissions?

Attributes
code class-attribute
code = 37
message class-attribute
message = 'A file given with FILE:// could not be opened. Most likely because the file path does not identify an existing file. Did you check file permissions?'

LdapCannotBindError

LdapCannotBindError(message=None, code=None)

Bases: redc.exceptions.CurlError

LDAP cannot bind. LDAP bind operation failed

Attributes
code class-attribute
code = 38
message class-attribute
message = 'LDAP cannot bind. LDAP bind operation failed'

LdapSearchFailedError

LdapSearchFailedError(message=None, code=None)

Bases: redc.exceptions.CurlError

LDAP search failed

Attributes
code class-attribute
code = 39
message class-attribute
message = 'LDAP search failed'

AbortedByCallbackError

AbortedByCallbackError(message=None, code=None)

Bases: redc.exceptions.CurlError

Aborted by callback. A callback returned "abort" to libcurl

Attributes
code class-attribute
code = 42
message class-attribute
message = 'Aborted by callback. A callback returned "abort" to libcurl'

BadFunctionArgumentError

BadFunctionArgumentError(message=None, code=None)

Bases: redc.exceptions.CurlError

A function was called with a bad parameter

Attributes
code class-attribute
code = 43
message class-attribute
message = 'A function was called with a bad parameter'

InterfaceFailedError

InterfaceFailedError(message=None, code=None)

Bases: redc.exceptions.CurlError

Interface error. A specified outgoing interface could not be used. Set which interface to use for outgoing connections' source IP address with CURLOPT_INTERFACE

Attributes
code class-attribute
code = 45
message class-attribute
message = "Interface error. A specified outgoing interface could not be used. Set which interface to use for outgoing connections' source IP address with [CURLOPT_INTERFACE](https://curl.se/libcurl/c/CURLOPT_INTERFACE.html)"

TooManyRedirectsError

TooManyRedirectsError(message=None, code=None)

Bases: redc.exceptions.CurlError

Too many redirects. When following redirects, libcurl hit the maximum amount. Set your limit with CURLOPT_MAXREDIRS

Attributes
code class-attribute
code = 47
message class-attribute
message = 'Too many redirects. When following redirects, libcurl hit the maximum amount. Set your limit with [CURLOPT_MAXREDIRS](https://curl.se/libcurl/c/CURLOPT_MAXREDIRS.html)'

UnknownOptionError

UnknownOptionError(message=None, code=None)

Bases: redc.exceptions.CurlError

An option passed to libcurl is not recognized/known. Refer to the appropriate documentation. This is most likely a problem in the program that uses libcurl. The error buffer might contain more specific information about which exact option it concerns

Attributes
code class-attribute
code = 48
message class-attribute
message = 'An option passed to libcurl is not recognized/known. Refer to the appropriate documentation. This is most likely a problem in the program that uses libcurl. The error buffer might contain more specific information about which exact option it concerns'

SetoptOptionSyntaxError

SetoptOptionSyntaxError(message=None, code=None)

Bases: redc.exceptions.CurlError

An option passed in to a setopt was wrongly formatted. See error message for details about what option

Attributes
code class-attribute
code = 49
message class-attribute
message = 'An option passed in to a setopt was wrongly formatted. See error message for details about what option'

GotNothingError

GotNothingError(message=None, code=None)

Bases: redc.exceptions.CurlError

Nothing was returned from the server, and under the circumstances, getting nothing is considered an error

Attributes
code class-attribute
code = 52
message class-attribute
message = 'Nothing was returned from the server, and under the circumstances, getting nothing is considered an error'

SslEngineNotfoundError

SslEngineNotfoundError(message=None, code=None)

Bases: redc.exceptions.CurlError

The specified crypto engine was not found

Attributes
code class-attribute
code = 53
message class-attribute
message = 'The specified crypto engine was not found'

SslEngineSetfailedError

SslEngineSetfailedError(message=None, code=None)

Bases: redc.exceptions.CurlError

Failed setting the selected SSL crypto engine as default

Attributes
code class-attribute
code = 54
message class-attribute
message = 'Failed setting the selected SSL crypto engine as default'

SendErrorError

SendErrorError(message=None, code=None)

Bases: redc.exceptions.CurlError

Failed sending network data

Attributes
code class-attribute
code = 55
message class-attribute
message = 'Failed sending network data'

RecvErrorError

RecvErrorError(message=None, code=None)

Bases: redc.exceptions.CurlError

Failure with receiving network data

Attributes
code class-attribute
code = 56
message class-attribute
message = 'Failure with receiving network data'

SslCertproblemError

SslCertproblemError(message=None, code=None)

Bases: redc.exceptions.CurlError

problem with the local client certificate

Attributes
code class-attribute
code = 58
message class-attribute
message = 'problem with the local client certificate'

SslCipherError

SslCipherError(message=None, code=None)

Bases: redc.exceptions.CurlError

Could not use specified cipher

Attributes
code class-attribute
code = 59
message class-attribute
message = 'Could not use specified cipher'

PeerFailedVerificationError

PeerFailedVerificationError(message=None, code=None)

Bases: redc.exceptions.CurlError

The remote server's SSL certificate or SSH fingerprint was deemed not OK. This error code has been unified with CURLE_SSL_CACERT since 7.62.0. Its previous value was 51

Attributes
code class-attribute
code = 60
message class-attribute
message = "The remote server's SSL certificate or SSH fingerprint was deemed not OK. This error code has been unified with CURLE_SSL_CACERT since 7.62.0. Its previous value was 51"

BadContentEncodingError

BadContentEncodingError(message=None, code=None)

Bases: redc.exceptions.CurlError

Unrecognized transfer encoding

Attributes
code class-attribute
code = 61
message class-attribute
message = 'Unrecognized transfer encoding'

FilesizeExceededError

FilesizeExceededError(message=None, code=None)

Bases: redc.exceptions.CurlError

Maximum file size exceeded

Attributes
code class-attribute
code = 63
message class-attribute
message = 'Maximum file size exceeded'

UseSslFailedError

UseSslFailedError(message=None, code=None)

Bases: redc.exceptions.CurlError

Requested FTP SSL level failed

Attributes
code class-attribute
code = 64
message class-attribute
message = 'Requested FTP SSL level failed'

SendFailRewindError

SendFailRewindError(message=None, code=None)

Bases: redc.exceptions.CurlError

When doing a send operation curl had to rewind the data to retransmit, but the rewinding operation failed

Attributes
code class-attribute
code = 65
message class-attribute
message = 'When doing a send operation curl had to rewind the data to retransmit, but the rewinding operation failed'

SslEngineInitfailedError

SslEngineInitfailedError(message=None, code=None)

Bases: redc.exceptions.CurlError

Initiating the SSL Engine failed

Attributes
code class-attribute
code = 66
message class-attribute
message = 'Initiating the SSL Engine failed'

LoginDeniedError

LoginDeniedError(message=None, code=None)

Bases: redc.exceptions.CurlError

The remote server denied curl to login

Attributes
code class-attribute
code = 67
message class-attribute
message = 'The remote server denied curl to login'

TftpNotfoundError

TftpNotfoundError(message=None, code=None)

Bases: redc.exceptions.CurlError

File not found on TFTP server

Attributes
code class-attribute
code = 68
message class-attribute
message = 'File not found on TFTP server'

TftpPermError

TftpPermError(message=None, code=None)

Bases: redc.exceptions.CurlError

Permission problem on TFTP server

Attributes
code class-attribute
code = 69
message class-attribute
message = 'Permission problem on TFTP server'

RemoteDiskFullError

RemoteDiskFullError(message=None, code=None)

Bases: redc.exceptions.CurlError

Out of disk space on the server

Attributes
code class-attribute
code = 70
message class-attribute
message = 'Out of disk space on the server'

TftpIllegalError

TftpIllegalError(message=None, code=None)

Bases: redc.exceptions.CurlError

Illegal TFTP operation

Attributes
code class-attribute
code = 71
message class-attribute
message = 'Illegal TFTP operation'

TftpUnknownidError

TftpUnknownidError(message=None, code=None)

Bases: redc.exceptions.CurlError

Unknown TFTP transfer ID

Attributes
code class-attribute
code = 72
message class-attribute
message = 'Unknown TFTP transfer ID'

RemoteFileExistsError

RemoteFileExistsError(message=None, code=None)

Bases: redc.exceptions.CurlError

File already exists and is not overwritten

Attributes
code class-attribute
code = 73
message class-attribute
message = 'File already exists and is not overwritten'

TftpNosuchuserError

TftpNosuchuserError(message=None, code=None)

Bases: redc.exceptions.CurlError

This error should never be returned by a properly functioning TFTP server

Attributes
code class-attribute
code = 74
message class-attribute
message = 'This error should never be returned by a properly functioning TFTP server'

SslCacertBadfileError

SslCacertBadfileError(message=None, code=None)

Bases: redc.exceptions.CurlError

Problem with reading the SSL CA cert (path? access rights?)

Attributes
code class-attribute
code = 77
message class-attribute
message = 'Problem with reading the SSL CA cert (path? access rights?)'

RemoteFileNotFoundError

RemoteFileNotFoundError(message=None, code=None)

Bases: redc.exceptions.CurlError

The resource referenced in the URL does not exist

Attributes
code class-attribute
code = 78
message class-attribute
message = 'The resource referenced in the URL does not exist'

SshError

SshError(message=None, code=None)

Bases: redc.exceptions.CurlError

An unspecified error occurred during the SSH session

Attributes
code class-attribute
code = 79
message class-attribute
message = 'An unspecified error occurred during the SSH session'

SslShutdownFailedError

SslShutdownFailedError(message=None, code=None)

Bases: redc.exceptions.CurlError

Failed to shut down the SSL connection

Attributes
code class-attribute
code = 80
message class-attribute
message = 'Failed to shut down the SSL connection'

AgainError

AgainError(message=None, code=None)

Bases: redc.exceptions.CurlError

Socket is not ready for send/recv. Wait until it is ready and try again. This return code is only returned from curl_easy_recv and curl_easy_send

Attributes
code class-attribute
code = 81
message class-attribute
message = 'Socket is not ready for send/recv. Wait until it is ready and try again. This return code is only returned from [curl_easy_recv](https://curl.se/libcurl/c/curl_easy_recv.html) and [curl_easy_send](https://curl.se/libcurl/c/curl_easy_send.html)'

SslCrlBadfileError

SslCrlBadfileError(message=None, code=None)

Bases: redc.exceptions.CurlError

Failed to load CRL file

Attributes
code class-attribute
code = 82
message class-attribute
message = 'Failed to load CRL file'

SslIssuerErrorError

SslIssuerErrorError(message=None, code=None)

Bases: redc.exceptions.CurlError

Issuer check failed

Attributes
code class-attribute
code = 83
message class-attribute
message = 'Issuer check failed'

FtpPretFailedError

FtpPretFailedError(message=None, code=None)

Bases: redc.exceptions.CurlError

The FTP server does not understand the PRET command at all or does not support the given argument. Be careful when using CURLOPT_CUSTOMREQUEST, a custom LIST command is sent with the PRET command before PASV as well

Attributes
code class-attribute
code = 84
message class-attribute
message = 'The FTP server does not understand the PRET command at all or does not support the given argument. Be careful when using [CURLOPT_CUSTOMREQUEST](https://curl.se/libcurl/c/CURLOPT_CUSTOMREQUEST.html), a custom LIST command is sent with the PRET command before PASV as well'

RtspCseqErrorError

RtspCseqErrorError(message=None, code=None)

Bases: redc.exceptions.CurlError

Mismatch of RTSP CSeq numbers

Attributes
code class-attribute
code = 85
message class-attribute
message = 'Mismatch of RTSP CSeq numbers'

RtspSessionErrorError

RtspSessionErrorError(message=None, code=None)

Bases: redc.exceptions.CurlError

Mismatch of RTSP Session Identifiers

Attributes
code class-attribute
code = 86
message class-attribute
message = 'Mismatch of RTSP Session Identifiers'

FtpBadFileListError

FtpBadFileListError(message=None, code=None)

Bases: redc.exceptions.CurlError

Unable to parse FTP file list (during FTP wildcard downloading)

Attributes
code class-attribute
code = 87
message class-attribute
message = 'Unable to parse FTP file list (during FTP wildcard downloading)'

ChunkFailedError

ChunkFailedError(message=None, code=None)

Bases: redc.exceptions.CurlError

Chunk callback reported error

Attributes
code class-attribute
code = 88
message class-attribute
message = 'Chunk callback reported error'

NoConnectionAvailableError

NoConnectionAvailableError(message=None, code=None)

Bases: redc.exceptions.CurlError

(For internal use only, is never returned by libcurl) No connection available, the session is queued

Attributes
code class-attribute
code = 89
message class-attribute
message = '(For internal use only, is never returned by libcurl) No connection available, the session is queued'

SslPinnedpubkeynotmatchError

SslPinnedpubkeynotmatchError(message=None, code=None)

Bases: redc.exceptions.CurlError

Failed to match the pinned key specified with CURLOPT_PINNEDPUBLICKEY

Attributes
code class-attribute
code = 90
message class-attribute
message = 'Failed to match the pinned key specified with [CURLOPT_PINNEDPUBLICKEY](https://curl.se/libcurl/c/CURLOPT_PINNEDPUBLICKEY.html)'

SslInvalidcertstatusError

SslInvalidcertstatusError(message=None, code=None)

Bases: redc.exceptions.CurlError

Status returned failure when asked with CURLOPT_SSL_VERIFYSTATUS

Attributes
code class-attribute
code = 91
message class-attribute
message = 'Status returned failure when asked with [CURLOPT_SSL_VERIFYSTATUS](https://curl.se/libcurl/c/CURLOPT_SSL_VERIFYSTATUS.html)'

Http2StreamError

Http2StreamError(message=None, code=None)

Bases: redc.exceptions.CurlError

Stream error in the HTTP/2 framing layer

Attributes
code class-attribute
code = 92
message class-attribute
message = 'Stream error in the HTTP/2 framing layer'

RecursiveApiCallError

RecursiveApiCallError(message=None, code=None)

Bases: redc.exceptions.CurlError

An API function was called from inside a callback

Attributes
code class-attribute
code = 93
message class-attribute
message = 'An API function was called from inside a callback'

AuthErrorError

AuthErrorError(message=None, code=None)

Bases: redc.exceptions.CurlError

An authentication function returned an error

Attributes
code class-attribute
code = 94
message class-attribute
message = 'An authentication function returned an error'

Http3Error

Http3Error(message=None, code=None)

Bases: redc.exceptions.CurlError

A problem was detected in the HTTP/3 layer. This is somewhat generic and can be one out of several problems, see the error buffer for details

Attributes
code class-attribute
code = 95
message class-attribute
message = 'A problem was detected in the HTTP/3 layer. This is somewhat generic and can be one out of several problems, see the error buffer for details'

QuicConnectErrorError

QuicConnectErrorError(message=None, code=None)

Bases: redc.exceptions.CurlError

QUIC connection error. This error may be caused by an SSL library error. QUIC is the protocol used for HTTP/3 transfers

Attributes
code class-attribute
code = 96
message class-attribute
message = 'QUIC connection error. This error may be caused by an SSL library error. QUIC is the protocol used for HTTP/3 transfers'

ProxyError

ProxyError(message=None, code=None)

Bases: redc.exceptions.CurlError

Proxy handshake error. CURLINFO_PROXY_ERROR provides extra details on the specific problem

Attributes
code class-attribute
code = 97
message class-attribute
message = 'Proxy handshake error. [CURLINFO_PROXY_ERROR](https://curl.se/libcurl/c/CURLINFO_PROXY_ERROR.html) provides extra details on the specific problem'

SslClientcertError

SslClientcertError(message=None, code=None)

Bases: redc.exceptions.CurlError

SSL Client Certificate required

Attributes
code class-attribute
code = 98
message class-attribute
message = 'SSL Client Certificate required'

UnrecoverablePollError

UnrecoverablePollError(message=None, code=None)

Bases: redc.exceptions.CurlError

An internal call to poll() or select() returned error that is not recoverable

Attributes
code class-attribute
code = 99
message class-attribute
message = 'An internal call to poll() or select() returned error that is not recoverable'

TooLargeError

TooLargeError(message=None, code=None)

Bases: redc.exceptions.CurlError

A value or data field grew larger than allowed

Attributes
code class-attribute
code = 100
message class-attribute
message = 'A value or data field grew larger than allowed'

EchRequiredError

EchRequiredError(message=None, code=None)

Bases: redc.exceptions.CurlError

ECH was attempted but failed

Attributes
code class-attribute
code = 101
message class-attribute
message = 'ECH was attempted but failed'

Functions:

exception_from_code

exception_from_code(code, message=None)