A client library for accessing KittyCAD
Project description
kittycad
A client library for accessing KittyCAD
Usage
First, create an authenticated client:
from kittycad import AuthenticatedClient
client = AuthenticatedClient(token="your_token")
If you want to use the environment variable KITTYCAD_API_TOKEN
to do
authentication and not pass one to the client, do the following:
from kittycad import AuthenticatedClientFromEnv
client = AuthenticatedClientFromEnv()
Now call your endpoint and use your models:
from kittycad.models import AuthSession
from kittycad.api.meta import meta_debug_session
from kittycad.types import Response
session: AuthSession = meta_debug_session.sync(client=client)
# or if you need more info (e.g. status_code)
response: Response[AuthSession] = meta_debug_session.sync_detailed(client=client)
Or do the same thing with an async version:
from kittycad.models import AuthSession
from kittycad.api.meta import meta_debug_session
from kittycad.types import Response
session: AuthSession = await meta_debug_session.asyncio(client=client)
response: Response[AuthSession] = await meta_debug_session.asyncio_detailed(client=client)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
kittycad-0.0.2.tar.gz
(7.1 kB
view hashes)
Built Distribution
kittycad-0.0.2-py3-none-any.whl
(14.8 kB
view hashes)