Komodo Health's Python SDK
Project description
Komodo Connector SDK
The Komodo Connector SDK is a Python library that provides programmatic access to the Komodo Health platform. It includes both a CLI for authentication management and a Python API for interacting with Komodo services and executing Snowflake queries through the Komodo platform.
Features
- OAuth 2.0 Device Authorization Flow: Browser-based authentication for easy credential management
- CLI Tools: Simple commands for login, JWT management, and account selection
- Snowflake Integration: Execute SQL queries against Komodo's Snowflake data warehouse via proxy
- Synchronous and Asynchronous Query Execution: Support for both blocking and async query patterns
- Automatic Token Refresh: Credentials are automatically refreshed when they expire
- Multi-Environment Support: Switch between integration and production environments
Prerequisites
- Python 3.11 or higher
Installation
Install via pip:
pip install komodo
Confirm expected version:
komodo --version
Usage
See: https://docs.komodohealth.com
Local Development
Building Images Locally
The komodo build command uses BuildKit to build and push container images. For local development outside of a Komodo workspace, you'll need to set up a local BuildKit daemon.
-
Docker: Ensure Docker Desktop is running
-
buildctl: Install the BuildKit client
brew install buildkit
-
Start a BuildKit daemon container with TCP access:
docker run -d --name buildkitd --privileged -p 1234:1234 moby/buildkit:latest --addr tcp://0.0.0.0:1234
- Set the BuildKit host environment variable:
export BUILDKIT_HOST="tcp://127.0.0.1:1234"
- Verify the connection:
buildctl --addr tcp://127.0.0.1:1234 debug workers
- Get AWS creds for AWS account and set them as environment variables:
export AWS_ACCESS_KEY_ID=<your-access-key-id>
export AWS_SECRET_ACCESS_KEY=<your-secret-access-key>
export AWS_SESSION_TOKEN=<your-session-token>
- Set the AWS role ARN environment variable:
dev/staging:
export AWS_ROLE_ARN=arn:aws:iam::<your-aws-account-id>:role/<your-aws-role-name>
prod:
export AWS_ROLE_ARN=arn:aws:iam::<your-aws-account-id>:role/<your-aws-role-name>
- Login using the CLI and set the account:
export KOMODO_ENVIRONMENT=integration
komodo login
komodo account set
Running a Build
Once BuildKit is configured, run the build command from a directory containing a Dockerfile or devfile.yaml:
komodo build
Stopping BuildKit
When you're done, you can stop and remove the BuildKit container:
docker rm -f buildkitd
Environment Variables
| Variable | Description | Default |
|---|---|---|
BUILDKIT_HOST |
BuildKit daemon address | docker-container://buildkitd (local) or tcp://buildkit-service.buildkit.svc.cluster.local:1234 (workspace) |
AWS_ROLE_ARN |
AWS role ARN for ECR authentication | Required for pushing images |
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file komodo-3.0.7.tar.gz.
File metadata
- Download URL: komodo-3.0.7.tar.gz
- Upload date:
- Size: 126.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
de82a74de4557ff6e06175e8abe71bb8c9ed81eea377c624f74bd9472b2ee21d
|
|
| MD5 |
da772bcfdcaa58062c1fc4c6fcb01197
|
|
| BLAKE2b-256 |
1208321bf720f9bd200d3c97000a7e4f352da8c702f7cdc59c384a6f9df292ac
|
File details
Details for the file komodo-3.0.7-py3-none-any.whl.
File metadata
- Download URL: komodo-3.0.7-py3-none-any.whl
- Upload date:
- Size: 177.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b1688edd7415a7281cf6d655b6f873816cf51cbed5652862801dfe09329355aa
|
|
| MD5 |
9356ae6b784fb23196a914bdfad24a1e
|
|
| BLAKE2b-256 |
1829b1281718959e958a80aba789e925e9ff59c86b2286b25203663d7eb4efaa
|