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

Type:

MetaAPI

api_calls[source]

ApiCallsAPI - Access to api_calls endpoints

Type:

ApiCallsAPI

hidden[source]

HiddenAPI - Access to hidden endpoints

Type:

HiddenAPI

file[source]

FileAPI - Access to file endpoints

Type:

FileAPI

executor[source]

ExecutorAPI - Access to executor endpoints

Type:

ExecutorAPI

ml[source]

MlAPI - Access to ml endpoints

Type:

MlAPI

oauth2[source]

Oauth2API - Access to oauth2 endpoints

Type:

Oauth2API

orgs[source]

OrgsAPI - Access to orgs endpoints

Type:

OrgsAPI

addresses[source]

AddressesAPI - Access to addresses endpoints

Type:

AddressesAPI

payments[source]

PaymentsAPI - Access to payments endpoints

Type:

PaymentsAPI

factory[source]

FactoryAPI - Access to factory endpoints

Type:

FactoryAPI

projects[source]

ProjectsAPI - Access to projects endpoints

Type:

ProjectsAPI

service_accounts[source]

ServiceAccountsAPI - Access to service_accounts endpoints

Type:

ServiceAccountsAPI

unit[source]

UnitAPI - Access to unit endpoints

Type:

UnitAPI

users[source]

UsersAPI - Access to users endpoints

Type:

UsersAPI

api_tokens[source]

ApiTokensAPI - Access to api_tokens endpoints

Type:

ApiTokensAPI

modeling[source]

ModelingAPI - Access to modeling endpoints

Type:

ModelingAPI

Method generated by attrs for class Client.

addresses: AddressesAPI[source]
api_calls: ApiCallsAPI[source]
api_tokens: ApiTokensAPI[source]
base_url: str[source]
close()[source]

Close the underlying HTTP client

Return type:

None

cookies: Dict[str, str][source]
executor: ExecutorAPI[source]
factory: FactoryAPI[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

get_websocket_recv_timeout()[source]
Return type:

Optional[float]

headers: Dict[str, str][source]
hidden: HiddenAPI[source]
http_client: Optional[Client][source]
meta: MetaAPI[source]
ml: MlAPI[source]
modeling: ModelingAPI[source]
oauth2: Oauth2API[source]
orgs: OrgsAPI[source]
payments: PaymentsAPI[source]
projects: ProjectsAPI[source]
service_accounts: ServiceAccountsAPI[source]
timeout: float[source]
token: str[source]
unit: UnitAPI[source]
users: UsersAPI[source]
verify_ssl: Union[str, bool, SSLContext, SSLContext][source]
websocket_recv_timeout: Optional[float][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

with_websocket_recv_timeout(timeout)[source]

Get a new client matching this one with a new websocket recv timeout

Return type:

Client