kittycad.KittyCAD

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

Bases: Client

Main KittyCAD client class with sync API interface.

Usage:

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

Or with environment variable:

client = KittyCAD() # Uses KITTYCAD_API_TOKEN or ZOO_API_TOKEN

meta[source]

MetaAPI - Access to meta endpoints

ml[source]

MlAPI - Access to ml endpoints

api_calls[source]

ApiCallsAPI - Access to api_calls endpoints

apps[source]

AppsAPI - Access to apps endpoints

hidden[source]

HiddenAPI - Access to hidden endpoints

file[source]

FileAPI - Access to file endpoints

executor[source]

ExecutorAPI - Access to executor endpoints

oauth2[source]

Oauth2API - Access to oauth2 endpoints

orgs[source]

OrgsAPI - Access to orgs endpoints

payments[source]

PaymentsAPI - Access to payments endpoints

service_accounts[source]

ServiceAccountsAPI - Access to service_accounts endpoints

store[source]

StoreAPI - Access to store endpoints

unit[source]

UnitAPI - Access to unit endpoints

users[source]

UsersAPI - Access to users endpoints

api_tokens[source]

ApiTokensAPI - Access to api_tokens endpoints

modeling[source]

ModelingAPI - Access to modeling endpoints

Method generated by attrs for class Client.

api_calls: ApiCallsAPI[source]
api_tokens: ApiTokensAPI[source]
apps: AppsAPI[source]
base_url: str[source]
close()[source]

Close the underlying HTTP client

Return type:

None

cookies: Dict[str, str][source]
executor: ExecutorAPI[source]
file: FileAPI[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.Client, creating it if necessary

Return type:

Client

get_timeout()[source]
Return type:

float

headers: Dict[str, str][source]
hidden: HiddenAPI[source]
http_client: Optional[httpx.Client][source]
meta: MetaAPI[source]
ml: MlAPI[source]
modeling: ModelingAPI[source]
oauth2: Oauth2API[source]
orgs: OrgsAPI[source]
payments: PaymentsAPI[source]
service_accounts: ServiceAccountsAPI[source]
store: StoreAPI[source]
timeout: float[source]
token: str[source]
unit: UnitAPI[source]
users: UsersAPI[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:

Client

with_cookies(cookies)[source]

Get a new client matching this one with additional cookies

Return type:

Client

with_headers(headers)[source]

Get a new client matching this one with additional headers

Return type:

Client

with_timeout(timeout)[source]

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

Return type:

Client