Quickstart
This guide assumes you already installed the SDK. You will authenticate, select an account, and run a minimal SQL query in Python.
Prerequisites
Section titled “Prerequisites”- Python 3.11, 3.12 or 3.13 (
>=3.11, <3.14)
Step 1: Authenticate
Section titled “Step 1: Authenticate”Start the OAuth login flow:
uv run komodo loginFollow the browser prompt to authenticate with your Komodo credentials.
Step 2: Set Your Account
Section titled “Step 2: Set Your Account”uv run komodo account setSelect your account from the interactive list. See Accounts and authentication for how accounts relate to your data.
Step 3: Run Your First Query
Section titled “Step 3: Run Your First Query”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):
uv run first_query.pyWhat You Just Did
Section titled “What You Just Did”- Authenticated using OAuth 2.0 device flow
- Selected your Komodo account
- Opened a DB-API 2.0 connection to your account’s Snowflake warehouse
- Ran SQL and printed rows
Next Steps
Section titled “Next Steps”- Executing Queries — cursors, fetching patterns, CLI
- Pandas Integration — DataFrames, batches,
read_sql - Async Queries — long-running queries with
execute_query_async - MCP Server — explore schemas from an AI assistant
- Troubleshooting — common errors and fixes