Skip to content

Quickstart

This guide assumes you already installed the SDK. You will authenticate, select an account, and run a minimal SQL query in Python.

  • Python 3.11, 3.12 or 3.13 (>=3.11, <3.14)

Start the OAuth login flow:

Terminal window
uv run komodo login

Follow the browser prompt to authenticate with your Komodo credentials.

Terminal window
uv run komodo account set

Select your account from the interactive list. See Accounts and authentication for how accounts relate to your data.

Create first_query.py:

from komodo import get_snowflake_connection
conn = get_snowflake_connection()
cursor = conn.cursor()
cursor.execute("USE DATABASE DATA")
cursor.execute(
"SELECT column_name, table_name FROM INFORMATION_SCHEMA.COLUMNS LIMIT 20"
)
for row in cursor.fetchall():
print(row)
cursor.close()
conn.close()

Run it (from the same directory as your project / pyproject.toml if you use uv run):

Terminal window
uv run first_query.py
  1. Authenticated using OAuth 2.0 device flow
  2. Selected your Komodo account
  3. Opened a DB-API 2.0 connection to your account’s Snowflake warehouse
  4. Ran SQL and printed rows