qcs_api_client.types#

Contains some shared types for properties

Module Contents#

Classes#

File

Contains information for file uploads

Response

Response from an API endpoint.

class qcs_api_client.types.File#

Contains information for file uploads

payload :Union[BinaryIO, TextIO]#
file_name :Optional[str]#
mime_type :Optional[str]#
to_tuple() Tuple[Optional[str], Union[BinaryIO, TextIO], Optional[str]]#

Return a tuple representation that httpx will accept for multipart/form-data

class qcs_api_client.types.Response#

Bases: httpx.Response, Generic[T]

Response from an API endpoint.

Serves as a minimal wrapper around an httpx.Response object, supporting parsing into a known API response type.

classmethod build_from_httpx_response(*, response: httpx.Response, parse_function: Callable[[httpx.Response], T]) Response#

Mutate an httpx.Response into a Response by respecifying the class and applying required values.

property parsed T#

Return the response body parsed into an API model.

Value is memoized after the first successful call.