kittycad.AsyncKittyCAD

class kittycad.AsyncKittyCAD(token=None, **kwargs)[source][source]

Bases: AsyncClient

Async KittyCAD client class with async API interface.

Usage:

import asyncio from kittycad import AsyncKittyCAD

async def main():

client = AsyncKittyCAD(token=”your-api-token”) user = await client.users.get_user_self()

asyncio.run(main())

Or with environment variable:

client = AsyncKittyCAD() # Uses KITTYCAD_API_TOKEN or ZOO_API_TOKEN

meta[source]

AsyncMetaAPI - Access to meta endpoints

ml[source]

AsyncMlAPI - Access to ml endpoints

api_calls[source]

AsyncApiCallsAPI - Access to api_calls endpoints

apps[source]

AsyncAppsAPI - Access to apps endpoints

hidden[source]

AsyncHiddenAPI - Access to hidden endpoints

file[source]

AsyncFileAPI - Access to file endpoints

executor[source]

AsyncExecutorAPI - Access to executor endpoints

oauth2[source]

AsyncOauth2API - Access to oauth2 endpoints

orgs[source]

AsyncOrgsAPI - Access to orgs endpoints

payments[source]

AsyncPaymentsAPI - Access to payments endpoints

service_accounts[source]

AsyncServiceAccountsAPI - Access to service_accounts endpoints

store[source]

AsyncStoreAPI - Access to store endpoints

unit[source]

AsyncUnitAPI - Access to unit endpoints

users[source]

AsyncUsersAPI - Access to users endpoints

api_tokens[source]

AsyncApiTokensAPI - Access to api_tokens endpoints

modeling[source]

AsyncModelingAPI - Access to modeling endpoints

Method generated by attrs for class AsyncClient.

async aclose()[source]

Close the underlying HTTP client

Return type:

None

api_calls: AsyncApiCallsAPI[source]
api_tokens: AsyncApiTokensAPI[source]
apps: AsyncAppsAPI[source]
base_url: str[source]
cookies: Dict[str, str][source]
executor: AsyncExecutorAPI[source]
file: AsyncFileAPI[source]
get_cookies()[source]
Return type:

Dict[str, str]

get_headers()[source]

Get headers to be used in all endpoints

Return type:

Dict[str, str]

get_http_client()[source]

Get the underlying httpx.AsyncClient, creating it if necessary

Return type:

AsyncClient

get_timeout()[source]
Return type:

float

headers: Dict[str, str][source]
hidden: AsyncHiddenAPI[source]
http_client: Optional[httpx.AsyncClient][source]
meta: AsyncMetaAPI[source]
ml: AsyncMlAPI[source]
modeling: AsyncModelingAPI[source]
oauth2: AsyncOauth2API[source]
orgs: AsyncOrgsAPI[source]
payments: AsyncPaymentsAPI[source]
service_accounts: AsyncServiceAccountsAPI[source]
store: AsyncStoreAPI[source]
timeout: float[source]
token: str[source]
unit: AsyncUnitAPI[source]
users: AsyncUsersAPI[source]
verify_ssl: Union[str, bool, ssl.SSLContext][source]
with_base_url(url)[source]

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

Return type:

AsyncClient

with_cookies(cookies)[source]

Get a new client matching this one with additional cookies

Return type:

AsyncClient

with_headers(headers)[source]

Get a new client matching this one with additional headers

Return type:

AsyncClient

with_timeout(timeout)[source]

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

Return type:

AsyncClient