Skip to main content

sasvi.custom

Low-level requester for custom SVI extension endpoints.

Exposes CustomEndpointClient, a thin authenticated wrapper over the retrying HTTPX transport for calling endpoints the typed service layer does not cover. It reuses the client's auth, retry, and response-size guards, and keeps requests locked to the configured base-URL origin unless the caller explicitly opts out with allow_external_auth=True.

CustomEndpointClient Objects​

class CustomEndpointClient()

Low-level requester for custom extension endpoints.

request​

def request(method: str,
path: str | httpx2.URL,
*,
base_url: str | None = None,
headers: Mapping[str, str] | None = None,
params: Mapping[str, Any] | None = None,
json: Any = None,
data: Any = None,
files: Any = None,
content: Any = None,
cookies: Any = None,
follow_redirects: bool | None = None,
timeout: float | httpx2.Timeout | None = None,
extensions: Mapping[str, Any] | None = None,
allow_external_auth: bool = False,
**kwargs: Any) -> httpx2.Response

Send an authenticated custom endpoint request.

Arguments:

  • method - HTTP method, for example "GET" or "POST".
  • path - Absolute URL, or a path relative to base_url or SVIConfig.base_url. An absolute URL must use https or http and carry no user-info.
  • base_url - Root for a relative path, used instead of SVIConfig.base_url. It goes through the same normalization, so a bare host becomes HTTPS. Ignored when path is absolute.
  • headers - Headers for this request, merged by HTTPX over the SDK defaults. A Host header must name the target URL's own host and port unless allow_external_auth is True.
  • params - Query parameters added to the URL.
  • json - Request body, serialized as JSON by HTTPX.
  • data - Form fields or raw body data, passed to HTTPX unchanged.
  • files - Multipart file payload, passed to HTTPX unchanged.
  • content - Raw body as bytes, text or a byte stream.
  • cookies - Cookies for this request. A request that sets cookies is treated as carrying a credential by the origin checks.
  • follow_redirects - Whether to follow redirects for this request. None keeps SVIConfig.follow_redirects.
  • timeout - Timeout for this request, in seconds or as an httpx2.Timeout. None keeps SVIConfig.timeout.
  • extensions - HTTPX request extensions, passed through unchanged.
  • allow_external_auth - When True, permit a request to an origin other than the configured base URL, including one carrying SDK credentials. Defaults to False, so every request stays locked to the base-URL origin.
  • **kwargs - Other keyword arguments passed unchanged to httpx2.Client.request.

Returns:

Raw httpx2.Response. Callers own status handling and payload parsing.

Raises:

  • AuthConfigurationError - When the resolved URL targets an origin other than SVIConfig.base_url and allow_external_auth is False, when a Host header names another host, or when a credential-carrying request has no configured base URL to lock to.
  • InvalidBaseURLError - When an absolute path uses a scheme other than https/http or embeds user-info, or when base_url fails normalization.
  • NetworkError - When the request failed before a complete response arrived and retries (if any) were exhausted. Check outcome_unknown before resending a write.
  • ServiceUnreachableError - When the service could not be reached.
  • TLSError - When TLS negotiation or certificate validation failed.
  • DeadlineExceededError - When request_deadline_seconds elapsed.
  • ResponseTooLargeError - When the response declares a body above SVIConfig.max_response_bytes.

request_async​

async def request_async(method: str,
path: str | httpx2.URL,
*,
base_url: str | None = None,
headers: Mapping[str, str] | None = None,
params: Mapping[str, Any] | None = None,
json: Any = None,
data: Any = None,
files: Any = None,
content: Any = None,
cookies: Any = None,
follow_redirects: bool | None = None,
timeout: float | httpx2.Timeout | None = None,
extensions: Mapping[str, Any] | None = None,
allow_external_auth: bool = False,
**kwargs: Any) -> httpx2.Response

Send an authenticated custom endpoint request asynchronously.

Arguments:

  • method - HTTP method, for example "GET" or "POST".
  • path - Absolute URL, or a path relative to base_url or SVIConfig.base_url. An absolute URL must use https or http and carry no user-info.
  • base_url - Root for a relative path, used instead of SVIConfig.base_url. It goes through the same normalization, so a bare host becomes HTTPS. Ignored when path is absolute.
  • headers - Headers for this request, merged by HTTPX over the SDK defaults. A Host header must name the target URL's own host and port unless allow_external_auth is True.
  • params - Query parameters added to the URL.
  • json - Request body, serialized as JSON by HTTPX.
  • data - Form fields or raw body data, passed to HTTPX unchanged.
  • files - Multipart file payload, passed to HTTPX unchanged.
  • content - Raw body as bytes, text or a byte stream.
  • cookies - Cookies for this request. A request that sets cookies is treated as carrying a credential by the origin checks.
  • follow_redirects - Whether to follow redirects for this request. None keeps SVIConfig.follow_redirects.
  • timeout - Timeout for this request, in seconds or as an httpx2.Timeout. None keeps SVIConfig.timeout.
  • extensions - HTTPX request extensions, passed through unchanged.
  • allow_external_auth - When True, permit a request to an origin other than the configured base URL, including one carrying SDK credentials. Defaults to False, so every request stays locked to the base-URL origin.
  • **kwargs - Other keyword arguments passed unchanged to httpx2.AsyncClient.request.

Returns:

Raw httpx2.Response. Callers own status handling and payload parsing.

Raises:

  • AuthConfigurationError - When the resolved URL targets an origin other than SVIConfig.base_url and allow_external_auth is False, when a Host header names another host, or when a credential-carrying request has no configured base URL to lock to.
  • InvalidBaseURLError - When an absolute path uses a scheme other than https/http or embeds user-info, or when base_url fails normalization.
  • NetworkError - When the request failed before a complete response arrived and retries (if any) were exhausted. Check outcome_unknown before resending a write.
  • ServiceUnreachableError - When the service could not be reached.
  • TLSError - When TLS negotiation or certificate validation failed.
  • DeadlineExceededError - When request_deadline_seconds elapsed.
  • ResponseTooLargeError - When the response declares a body above SVIConfig.max_response_bytes.

get​

def get(path: str | httpx2.URL,
*,
base_url: str | None = None,
headers: Mapping[str, str] | None = None,
params: Mapping[str, Any] | None = None,
cookies: Any = None,
follow_redirects: bool | None = None,
timeout: float | httpx2.Timeout | None = None,
extensions: Mapping[str, Any] | None = None,
allow_external_auth: bool = False) -> httpx2.Response

Send an authenticated GET request and return the raw response.

Arguments:

  • path - Absolute URL, or a path relative to base_url or SVIConfig.base_url. An absolute URL must use https or http and carry no user-info.
  • base_url - Root for a relative path, used instead of SVIConfig.base_url. It goes through the same normalization, so a bare host becomes HTTPS. Ignored when path is absolute.
  • headers - Headers for this request, merged by HTTPX over the SDK defaults. A Host header must name the target URL's own host and port unless allow_external_auth is True.
  • params - Query parameters added to the URL.
  • cookies - Cookies for this request. A request that sets cookies is treated as carrying a credential by the origin checks.
  • follow_redirects - Whether to follow redirects for this request. None keeps SVIConfig.follow_redirects.
  • timeout - Timeout for this request, in seconds or as an httpx2.Timeout. None keeps SVIConfig.timeout.
  • extensions - HTTPX request extensions, passed through unchanged.
  • allow_external_auth - When True, permit a request to an origin other than the configured base URL, including one carrying SDK credentials. Defaults to False, so every request stays locked to the base-URL origin.

Returns:

Raw httpx2.Response. Callers own status handling and payload parsing.

Raises:

  • AuthConfigurationError - When the resolved URL targets an origin other than SVIConfig.base_url and allow_external_auth is False, when a Host header names another host, or when a credential-carrying request has no configured base URL to lock to.
  • InvalidBaseURLError - When an absolute path uses a scheme other than https/http or embeds user-info, or when base_url fails normalization.
  • NetworkError - When the request failed before a complete response arrived and retries (if any) were exhausted. Check outcome_unknown before resending a write.
  • ServiceUnreachableError - When the service could not be reached.
  • TLSError - When TLS negotiation or certificate validation failed.
  • DeadlineExceededError - When request_deadline_seconds elapsed.
  • ResponseTooLargeError - When the response declares a body above SVIConfig.max_response_bytes.

post​

def post(path: str | httpx2.URL,
*,
base_url: str | None = None,
headers: Mapping[str, str] | None = None,
params: Mapping[str, Any] | None = None,
json: Any = None,
data: Any = None,
files: Any = None,
content: Any = None,
cookies: Any = None,
follow_redirects: bool | None = None,
timeout: float | httpx2.Timeout | None = None,
extensions: Mapping[str, Any] | None = None,
allow_external_auth: bool = False) -> httpx2.Response

Send an authenticated POST request and return the raw response.

Use json for JSON bodies, data for form or raw data, files for multipart uploads, or content for explicit raw content.

Arguments:

  • path - Absolute URL, or a path relative to base_url or SVIConfig.base_url. An absolute URL must use https or http and carry no user-info.
  • base_url - Root for a relative path, used instead of SVIConfig.base_url. It goes through the same normalization, so a bare host becomes HTTPS. Ignored when path is absolute.
  • headers - Headers for this request, merged by HTTPX over the SDK defaults. A Host header must name the target URL's own host and port unless allow_external_auth is True.
  • params - Query parameters added to the URL.
  • json - Request body, serialized as JSON by HTTPX.
  • data - Form fields or raw body data, passed to HTTPX unchanged.
  • files - Multipart file payload, passed to HTTPX unchanged.
  • content - Raw body as bytes, text or a byte stream.
  • cookies - Cookies for this request. A request that sets cookies is treated as carrying a credential by the origin checks.
  • follow_redirects - Whether to follow redirects for this request. None keeps SVIConfig.follow_redirects.
  • timeout - Timeout for this request, in seconds or as an httpx2.Timeout. None keeps SVIConfig.timeout.
  • extensions - HTTPX request extensions, passed through unchanged.
  • allow_external_auth - When True, permit a request to an origin other than the configured base URL, including one carrying SDK credentials. Defaults to False, so every request stays locked to the base-URL origin.

Returns:

Raw httpx2.Response. Callers own status handling and payload parsing.

Raises:

  • AuthConfigurationError - When the resolved URL targets an origin other than SVIConfig.base_url and allow_external_auth is False, when a Host header names another host, or when a credential-carrying request has no configured base URL to lock to.
  • InvalidBaseURLError - When an absolute path uses a scheme other than https/http or embeds user-info, or when base_url fails normalization.
  • NetworkError - When the request failed before a complete response arrived and retries (if any) were exhausted. Check outcome_unknown before resending a write.
  • ServiceUnreachableError - When the service could not be reached.
  • TLSError - When TLS negotiation or certificate validation failed.
  • DeadlineExceededError - When request_deadline_seconds elapsed.
  • ResponseTooLargeError - When the response declares a body above SVIConfig.max_response_bytes.

put​

def put(path: str | httpx2.URL,
*,
base_url: str | None = None,
headers: Mapping[str, str] | None = None,
params: Mapping[str, Any] | None = None,
json: Any = None,
data: Any = None,
files: Any = None,
content: Any = None,
cookies: Any = None,
follow_redirects: bool | None = None,
timeout: float | httpx2.Timeout | None = None,
extensions: Mapping[str, Any] | None = None,
allow_external_auth: bool = False) -> httpx2.Response

Send an authenticated PUT request and return the raw response.

Use this for full-resource replacement endpoints that expect JSON, form data, multipart files, or raw content.

Arguments:

  • path - Absolute URL, or a path relative to base_url or SVIConfig.base_url. An absolute URL must use https or http and carry no user-info.
  • base_url - Root for a relative path, used instead of SVIConfig.base_url. It goes through the same normalization, so a bare host becomes HTTPS. Ignored when path is absolute.
  • headers - Headers for this request, merged by HTTPX over the SDK defaults. A Host header must name the target URL's own host and port unless allow_external_auth is True.
  • params - Query parameters added to the URL.
  • json - Request body, serialized as JSON by HTTPX.
  • data - Form fields or raw body data, passed to HTTPX unchanged.
  • files - Multipart file payload, passed to HTTPX unchanged.
  • content - Raw body as bytes, text or a byte stream.
  • cookies - Cookies for this request. A request that sets cookies is treated as carrying a credential by the origin checks.
  • follow_redirects - Whether to follow redirects for this request. None keeps SVIConfig.follow_redirects.
  • timeout - Timeout for this request, in seconds or as an httpx2.Timeout. None keeps SVIConfig.timeout.
  • extensions - HTTPX request extensions, passed through unchanged.
  • allow_external_auth - When True, permit a request to an origin other than the configured base URL, including one carrying SDK credentials. Defaults to False, so every request stays locked to the base-URL origin.

Returns:

Raw httpx2.Response. Callers own status handling and payload parsing.

Raises:

  • AuthConfigurationError - When the resolved URL targets an origin other than SVIConfig.base_url and allow_external_auth is False, when a Host header names another host, or when a credential-carrying request has no configured base URL to lock to.
  • InvalidBaseURLError - When an absolute path uses a scheme other than https/http or embeds user-info, or when base_url fails normalization.
  • NetworkError - When the request failed before a complete response arrived and retries (if any) were exhausted. Check outcome_unknown before resending a write.
  • ServiceUnreachableError - When the service could not be reached.
  • TLSError - When TLS negotiation or certificate validation failed.
  • DeadlineExceededError - When request_deadline_seconds elapsed.
  • ResponseTooLargeError - When the response declares a body above SVIConfig.max_response_bytes.

patch​

def patch(path: str | httpx2.URL,
*,
base_url: str | None = None,
headers: Mapping[str, str] | None = None,
params: Mapping[str, Any] | None = None,
json: Any = None,
data: Any = None,
files: Any = None,
content: Any = None,
cookies: Any = None,
follow_redirects: bool | None = None,
timeout: float | httpx2.Timeout | None = None,
extensions: Mapping[str, Any] | None = None,
allow_external_auth: bool = False) -> httpx2.Response

Send an authenticated PATCH request and return the raw response.

Use this for partial update endpoints that expect JSON, form data, multipart files, or raw content.

Arguments:

  • path - Absolute URL, or a path relative to base_url or SVIConfig.base_url. An absolute URL must use https or http and carry no user-info.
  • base_url - Root for a relative path, used instead of SVIConfig.base_url. It goes through the same normalization, so a bare host becomes HTTPS. Ignored when path is absolute.
  • headers - Headers for this request, merged by HTTPX over the SDK defaults. A Host header must name the target URL's own host and port unless allow_external_auth is True.
  • params - Query parameters added to the URL.
  • json - Request body, serialized as JSON by HTTPX.
  • data - Form fields or raw body data, passed to HTTPX unchanged.
  • files - Multipart file payload, passed to HTTPX unchanged.
  • content - Raw body as bytes, text or a byte stream.
  • cookies - Cookies for this request. A request that sets cookies is treated as carrying a credential by the origin checks.
  • follow_redirects - Whether to follow redirects for this request. None keeps SVIConfig.follow_redirects.
  • timeout - Timeout for this request, in seconds or as an httpx2.Timeout. None keeps SVIConfig.timeout.
  • extensions - HTTPX request extensions, passed through unchanged.
  • allow_external_auth - When True, permit a request to an origin other than the configured base URL, including one carrying SDK credentials. Defaults to False, so every request stays locked to the base-URL origin.

Returns:

Raw httpx2.Response. Callers own status handling and payload parsing.

Raises:

  • AuthConfigurationError - When the resolved URL targets an origin other than SVIConfig.base_url and allow_external_auth is False, when a Host header names another host, or when a credential-carrying request has no configured base URL to lock to.
  • InvalidBaseURLError - When an absolute path uses a scheme other than https/http or embeds user-info, or when base_url fails normalization.
  • NetworkError - When the request failed before a complete response arrived and retries (if any) were exhausted. Check outcome_unknown before resending a write.
  • ServiceUnreachableError - When the service could not be reached.
  • TLSError - When TLS negotiation or certificate validation failed.
  • DeadlineExceededError - When request_deadline_seconds elapsed.
  • ResponseTooLargeError - When the response declares a body above SVIConfig.max_response_bytes.

delete​

def delete(path: str | httpx2.URL,
*,
base_url: str | None = None,
headers: Mapping[str, str] | None = None,
params: Mapping[str, Any] | None = None,
json: Any = None,
data: Any = None,
content: Any = None,
cookies: Any = None,
follow_redirects: bool | None = None,
timeout: float | httpx2.Timeout | None = None,
extensions: Mapping[str, Any] | None = None,
allow_external_auth: bool = False) -> httpx2.Response

Send an authenticated DELETE request and return the raw response.

json, data, and content are available for endpoints that accept a request body with DELETE.

Arguments:

  • path - Absolute URL, or a path relative to base_url or SVIConfig.base_url. An absolute URL must use https or http and carry no user-info.
  • base_url - Root for a relative path, used instead of SVIConfig.base_url. It goes through the same normalization, so a bare host becomes HTTPS. Ignored when path is absolute.
  • headers - Headers for this request, merged by HTTPX over the SDK defaults. A Host header must name the target URL's own host and port unless allow_external_auth is True.
  • params - Query parameters added to the URL.
  • json - Request body, serialized as JSON by HTTPX.
  • data - Form fields or raw body data, passed to HTTPX unchanged.
  • content - Raw body as bytes, text or a byte stream.
  • cookies - Cookies for this request. A request that sets cookies is treated as carrying a credential by the origin checks.
  • follow_redirects - Whether to follow redirects for this request. None keeps SVIConfig.follow_redirects.
  • timeout - Timeout for this request, in seconds or as an httpx2.Timeout. None keeps SVIConfig.timeout.
  • extensions - HTTPX request extensions, passed through unchanged.
  • allow_external_auth - When True, permit a request to an origin other than the configured base URL, including one carrying SDK credentials. Defaults to False, so every request stays locked to the base-URL origin.

Returns:

Raw httpx2.Response. Callers own status handling and payload parsing.

Raises:

  • AuthConfigurationError - When the resolved URL targets an origin other than SVIConfig.base_url and allow_external_auth is False, when a Host header names another host, or when a credential-carrying request has no configured base URL to lock to.
  • InvalidBaseURLError - When an absolute path uses a scheme other than https/http or embeds user-info, or when base_url fails normalization.
  • NetworkError - When the request failed before a complete response arrived and retries (if any) were exhausted. Check outcome_unknown before resending a write.
  • ServiceUnreachableError - When the service could not be reached.
  • TLSError - When TLS negotiation or certificate validation failed.
  • DeadlineExceededError - When request_deadline_seconds elapsed.
  • ResponseTooLargeError - When the response declares a body above SVIConfig.max_response_bytes.

get_async​

async def get_async(path: str | httpx2.URL,
*,
base_url: str | None = None,
headers: Mapping[str, str] | None = None,
params: Mapping[str, Any] | None = None,
cookies: Any = None,
follow_redirects: bool | None = None,
timeout: float | httpx2.Timeout | None = None,
extensions: Mapping[str, Any] | None = None,
allow_external_auth: bool = False) -> httpx2.Response

Send an authenticated async GET request and return the raw response.

Arguments:

  • path - Absolute URL, or a path relative to base_url or SVIConfig.base_url. An absolute URL must use https or http and carry no user-info.
  • base_url - Root for a relative path, used instead of SVIConfig.base_url. It goes through the same normalization, so a bare host becomes HTTPS. Ignored when path is absolute.
  • headers - Headers for this request, merged by HTTPX over the SDK defaults. A Host header must name the target URL's own host and port unless allow_external_auth is True.
  • params - Query parameters added to the URL.
  • cookies - Cookies for this request. A request that sets cookies is treated as carrying a credential by the origin checks.
  • follow_redirects - Whether to follow redirects for this request. None keeps SVIConfig.follow_redirects.
  • timeout - Timeout for this request, in seconds or as an httpx2.Timeout. None keeps SVIConfig.timeout.
  • extensions - HTTPX request extensions, passed through unchanged.
  • allow_external_auth - When True, permit a request to an origin other than the configured base URL, including one carrying SDK credentials. Defaults to False, so every request stays locked to the base-URL origin.

Returns:

Raw httpx2.Response. Callers own status handling and payload parsing.

Raises:

  • AuthConfigurationError - When the resolved URL targets an origin other than SVIConfig.base_url and allow_external_auth is False, when a Host header names another host, or when a credential-carrying request has no configured base URL to lock to.
  • InvalidBaseURLError - When an absolute path uses a scheme other than https/http or embeds user-info, or when base_url fails normalization.
  • NetworkError - When the request failed before a complete response arrived and retries (if any) were exhausted. Check outcome_unknown before resending a write.
  • ServiceUnreachableError - When the service could not be reached.
  • TLSError - When TLS negotiation or certificate validation failed.
  • DeadlineExceededError - When request_deadline_seconds elapsed.
  • ResponseTooLargeError - When the response declares a body above SVIConfig.max_response_bytes.

post_async​

async def post_async(path: str | httpx2.URL,
*,
base_url: str | None = None,
headers: Mapping[str, str] | None = None,
params: Mapping[str, Any] | None = None,
json: Any = None,
data: Any = None,
files: Any = None,
content: Any = None,
cookies: Any = None,
follow_redirects: bool | None = None,
timeout: float | httpx2.Timeout | None = None,
extensions: Mapping[str, Any] | None = None,
allow_external_auth: bool = False) -> httpx2.Response

Send an authenticated async POST request and return the raw response.

Use json for JSON bodies, data for form or raw data, files for multipart uploads, or content for explicit raw content.

Arguments:

  • path - Absolute URL, or a path relative to base_url or SVIConfig.base_url. An absolute URL must use https or http and carry no user-info.
  • base_url - Root for a relative path, used instead of SVIConfig.base_url. It goes through the same normalization, so a bare host becomes HTTPS. Ignored when path is absolute.
  • headers - Headers for this request, merged by HTTPX over the SDK defaults. A Host header must name the target URL's own host and port unless allow_external_auth is True.
  • params - Query parameters added to the URL.
  • json - Request body, serialized as JSON by HTTPX.
  • data - Form fields or raw body data, passed to HTTPX unchanged.
  • files - Multipart file payload, passed to HTTPX unchanged.
  • content - Raw body as bytes, text or a byte stream.
  • cookies - Cookies for this request. A request that sets cookies is treated as carrying a credential by the origin checks.
  • follow_redirects - Whether to follow redirects for this request. None keeps SVIConfig.follow_redirects.
  • timeout - Timeout for this request, in seconds or as an httpx2.Timeout. None keeps SVIConfig.timeout.
  • extensions - HTTPX request extensions, passed through unchanged.
  • allow_external_auth - When True, permit a request to an origin other than the configured base URL, including one carrying SDK credentials. Defaults to False, so every request stays locked to the base-URL origin.

Returns:

Raw httpx2.Response. Callers own status handling and payload parsing.

Raises:

  • AuthConfigurationError - When the resolved URL targets an origin other than SVIConfig.base_url and allow_external_auth is False, when a Host header names another host, or when a credential-carrying request has no configured base URL to lock to.
  • InvalidBaseURLError - When an absolute path uses a scheme other than https/http or embeds user-info, or when base_url fails normalization.
  • NetworkError - When the request failed before a complete response arrived and retries (if any) were exhausted. Check outcome_unknown before resending a write.
  • ServiceUnreachableError - When the service could not be reached.
  • TLSError - When TLS negotiation or certificate validation failed.
  • DeadlineExceededError - When request_deadline_seconds elapsed.
  • ResponseTooLargeError - When the response declares a body above SVIConfig.max_response_bytes.

put_async​

async def put_async(path: str | httpx2.URL,
*,
base_url: str | None = None,
headers: Mapping[str, str] | None = None,
params: Mapping[str, Any] | None = None,
json: Any = None,
data: Any = None,
files: Any = None,
content: Any = None,
cookies: Any = None,
follow_redirects: bool | None = None,
timeout: float | httpx2.Timeout | None = None,
extensions: Mapping[str, Any] | None = None,
allow_external_auth: bool = False) -> httpx2.Response

Send an authenticated async PUT request and return the raw response.

Use this for full-resource replacement endpoints that expect JSON, form data, multipart files, or raw content.

Arguments:

  • path - Absolute URL, or a path relative to base_url or SVIConfig.base_url. An absolute URL must use https or http and carry no user-info.
  • base_url - Root for a relative path, used instead of SVIConfig.base_url. It goes through the same normalization, so a bare host becomes HTTPS. Ignored when path is absolute.
  • headers - Headers for this request, merged by HTTPX over the SDK defaults. A Host header must name the target URL's own host and port unless allow_external_auth is True.
  • params - Query parameters added to the URL.
  • json - Request body, serialized as JSON by HTTPX.
  • data - Form fields or raw body data, passed to HTTPX unchanged.
  • files - Multipart file payload, passed to HTTPX unchanged.
  • content - Raw body as bytes, text or a byte stream.
  • cookies - Cookies for this request. A request that sets cookies is treated as carrying a credential by the origin checks.
  • follow_redirects - Whether to follow redirects for this request. None keeps SVIConfig.follow_redirects.
  • timeout - Timeout for this request, in seconds or as an httpx2.Timeout. None keeps SVIConfig.timeout.
  • extensions - HTTPX request extensions, passed through unchanged.
  • allow_external_auth - When True, permit a request to an origin other than the configured base URL, including one carrying SDK credentials. Defaults to False, so every request stays locked to the base-URL origin.

Returns:

Raw httpx2.Response. Callers own status handling and payload parsing.

Raises:

  • AuthConfigurationError - When the resolved URL targets an origin other than SVIConfig.base_url and allow_external_auth is False, when a Host header names another host, or when a credential-carrying request has no configured base URL to lock to.
  • InvalidBaseURLError - When an absolute path uses a scheme other than https/http or embeds user-info, or when base_url fails normalization.
  • NetworkError - When the request failed before a complete response arrived and retries (if any) were exhausted. Check outcome_unknown before resending a write.
  • ServiceUnreachableError - When the service could not be reached.
  • TLSError - When TLS negotiation or certificate validation failed.
  • DeadlineExceededError - When request_deadline_seconds elapsed.
  • ResponseTooLargeError - When the response declares a body above SVIConfig.max_response_bytes.

patch_async​

async def patch_async(path: str | httpx2.URL,
*,
base_url: str | None = None,
headers: Mapping[str, str] | None = None,
params: Mapping[str, Any] | None = None,
json: Any = None,
data: Any = None,
files: Any = None,
content: Any = None,
cookies: Any = None,
follow_redirects: bool | None = None,
timeout: float | httpx2.Timeout | None = None,
extensions: Mapping[str, Any] | None = None,
allow_external_auth: bool = False) -> httpx2.Response

Send an authenticated async PATCH request and return the raw response.

Use this for partial update endpoints that expect JSON, form data, multipart files, or raw content.

Arguments:

  • path - Absolute URL, or a path relative to base_url or SVIConfig.base_url. An absolute URL must use https or http and carry no user-info.
  • base_url - Root for a relative path, used instead of SVIConfig.base_url. It goes through the same normalization, so a bare host becomes HTTPS. Ignored when path is absolute.
  • headers - Headers for this request, merged by HTTPX over the SDK defaults. A Host header must name the target URL's own host and port unless allow_external_auth is True.
  • params - Query parameters added to the URL.
  • json - Request body, serialized as JSON by HTTPX.
  • data - Form fields or raw body data, passed to HTTPX unchanged.
  • files - Multipart file payload, passed to HTTPX unchanged.
  • content - Raw body as bytes, text or a byte stream.
  • cookies - Cookies for this request. A request that sets cookies is treated as carrying a credential by the origin checks.
  • follow_redirects - Whether to follow redirects for this request. None keeps SVIConfig.follow_redirects.
  • timeout - Timeout for this request, in seconds or as an httpx2.Timeout. None keeps SVIConfig.timeout.
  • extensions - HTTPX request extensions, passed through unchanged.
  • allow_external_auth - When True, permit a request to an origin other than the configured base URL, including one carrying SDK credentials. Defaults to False, so every request stays locked to the base-URL origin.

Returns:

Raw httpx2.Response. Callers own status handling and payload parsing.

Raises:

  • AuthConfigurationError - When the resolved URL targets an origin other than SVIConfig.base_url and allow_external_auth is False, when a Host header names another host, or when a credential-carrying request has no configured base URL to lock to.
  • InvalidBaseURLError - When an absolute path uses a scheme other than https/http or embeds user-info, or when base_url fails normalization.
  • NetworkError - When the request failed before a complete response arrived and retries (if any) were exhausted. Check outcome_unknown before resending a write.
  • ServiceUnreachableError - When the service could not be reached.
  • TLSError - When TLS negotiation or certificate validation failed.
  • DeadlineExceededError - When request_deadline_seconds elapsed.
  • ResponseTooLargeError - When the response declares a body above SVIConfig.max_response_bytes.

delete_async​

async def delete_async(path: str | httpx2.URL,
*,
base_url: str | None = None,
headers: Mapping[str, str] | None = None,
params: Mapping[str, Any] | None = None,
json: Any = None,
data: Any = None,
content: Any = None,
cookies: Any = None,
follow_redirects: bool | None = None,
timeout: float | httpx2.Timeout | None = None,
extensions: Mapping[str, Any] | None = None,
allow_external_auth: bool = False) -> httpx2.Response

Send an authenticated async DELETE request and return the raw response.

json, data, and content are available for endpoints that accept a request body with DELETE.

Arguments:

  • path - Absolute URL, or a path relative to base_url or SVIConfig.base_url. An absolute URL must use https or http and carry no user-info.
  • base_url - Root for a relative path, used instead of SVIConfig.base_url. It goes through the same normalization, so a bare host becomes HTTPS. Ignored when path is absolute.
  • headers - Headers for this request, merged by HTTPX over the SDK defaults. A Host header must name the target URL's own host and port unless allow_external_auth is True.
  • params - Query parameters added to the URL.
  • json - Request body, serialized as JSON by HTTPX.
  • data - Form fields or raw body data, passed to HTTPX unchanged.
  • content - Raw body as bytes, text or a byte stream.
  • cookies - Cookies for this request. A request that sets cookies is treated as carrying a credential by the origin checks.
  • follow_redirects - Whether to follow redirects for this request. None keeps SVIConfig.follow_redirects.
  • timeout - Timeout for this request, in seconds or as an httpx2.Timeout. None keeps SVIConfig.timeout.
  • extensions - HTTPX request extensions, passed through unchanged.
  • allow_external_auth - When True, permit a request to an origin other than the configured base URL, including one carrying SDK credentials. Defaults to False, so every request stays locked to the base-URL origin.

Returns:

Raw httpx2.Response. Callers own status handling and payload parsing.

Raises:

  • AuthConfigurationError - When the resolved URL targets an origin other than SVIConfig.base_url and allow_external_auth is False, when a Host header names another host, or when a credential-carrying request has no configured base URL to lock to.
  • InvalidBaseURLError - When an absolute path uses a scheme other than https/http or embeds user-info, or when base_url fails normalization.
  • NetworkError - When the request failed before a complete response arrived and retries (if any) were exhausted. Check outcome_unknown before resending a write.
  • ServiceUnreachableError - When the service could not be reached.
  • TLSError - When TLS negotiation or certificate validation failed.
  • DeadlineExceededError - When request_deadline_seconds elapsed.
  • ResponseTooLargeError - When the response declares a body above SVIConfig.max_response_bytes.

close​

def close() -> None

Close the underlying synchronous HTTP client and release resources.

A connection pool shared with the owning SVIClient stays open; that client closes it.

close_async​

async def close_async() -> None

Close the underlying asynchronous HTTP client and release resources.