kittycad.client.AsyncClient

class kittycad.client.AsyncClient(base_url='https://api.zoo.dev', *, token, cookies=NOTHING, headers=NOTHING, timeout=120.0, verify_ssl=True, http_client=None)[source][source]

Bases: object

An Async Client which has been authenticated for use on secured endpoints of the KittyCAD API.

Method generated by attrs for class AsyncClient.

async aclose()[source][source]

Close the underlying HTTP client

Return type:

None

base_url: str[source]
cookies: Dict[str, str][source]
get_cookies()[source][source]
Return type:

Dict[str, str]

get_headers()[source][source]

Get headers to be used in all endpoints

Return type:

Dict[str, str]

get_http_client()[source][source]

Get the underlying httpx.AsyncClient, creating it if necessary

Return type:

AsyncClient

get_timeout()[source][source]
Return type:

float

headers: Dict[str, str][source]
http_client: Optional[AsyncClient][source]
timeout: float[source]
token: str[source]
verify_ssl: Union[str, bool, SSLContext][source]
with_base_url(url)[source][source]

Get a new client matching this one with a new base url

Return type:

AsyncClient

with_cookies(cookies)[source][source]

Get a new client matching this one with additional cookies

Return type:

AsyncClient

with_headers(headers)[source][source]

Get a new client matching this one with additional headers

Return type:

AsyncClient

with_timeout(timeout)[source][source]

Get a new client matching this one with a new timeout (in seconds)

Return type:

AsyncClient