Python SDK: Getting Started

The Keito Python SDK (keito-python) provides a client for Python applications, agent frameworks, and notebooks.

Install

pip install keito-python
# or
poetry add keito-python

Initialise

import os
from keito import Keito

client = Keito(
    api_key=os.environ["KEITO_API_KEY"],
    account_id=os.environ["KEITO_ACCOUNT_ID"],
)

Like the Node SDK, the Python client reads from environment variables by default:

client = Keito()  # reads KEITO_API_KEY and KEITO_ACCOUNT_ID from env

Configuration Options

OptionTypeDefaultDescription
api_keystrenvYour API key
account_idstrenvYour workspace ID
base_urlstrhttps://api.keito.ai/v1API base URL
max_retriesint2Max retry attempts on failure
timeoutfloat30.0Request timeout in seconds

Your First Request

# List all projects
projects = client.projects.list()

for project in projects.data:
    print(f"{project.name} ({project.id})")

Next Steps