Prerequisites
Before installing the SDK, ensure you have:- Python 3.8+ installed on your system
- pip package manager
- Kubiya Control Plane API Key from the Kubiya platform
Installation
Install via pip
Install from Source
Optional Dependencies (Workflow DSL)
Configuration
Get Your API Key
- Log in to the Kubiya platform
- Navigate to Settings → API Keys
- Create a new API key or copy an existing one
Configure Authentication (Control Plane)
Option 1: Environment Variables (Recommended)
PowerShell (Windows):Option 2: Programmatic Configuration (Control Plane)
Configure directly in your Python code:Verify Installation
Control Plane: Quick Test
Test your installation and connection:Version Check (Workflow DSL)
Workflow DSL: Feature Test
IDE Setup
VS Code
- Install the Python extension
- Add these settings to your workspace (
.vscode/settings.json):
- For better autocompletion, install type stubs:
PyCharm
- Go to File → Settings → Project → Python Interpreter
- Add the
kubiya-sdkpackage to your interpreter - Enable type checking in Settings → Editor → Inspections → Python
- Configure code style to use Black formatter
Jupyter Notebooks
The SDK works great in Jupyter notebooks:Docker Setup
Using Docker
Create aDockerfile:
Docker Compose
Create adocker-compose.yml:
Environment Variables
Configure your environment by creating a.env file:
Development Setup (Workflow DSL)
For SDK development and contributions:Clone Repository
Create Virtual Environment
Install Development Dependencies
Run Tests
Troubleshooting
Common Issues
ImportError: No module named ‘kubiya’
Solution: Ensure the SDK is installed in your current Python environmentAuthenticationError: Invalid API key (Control Plane)
Solution: Verify your API key is correctConnectionTimeout: Request timed out
Solution: Increase timeout or check network connectivitySSL Certificate Error
Solution: For development environments only (not recommended for production)Enable Debug Logging (Workflow DSL)
For troubleshooting, enable debug logging:Version Compatibility (Workflow DSL)
| Kubiya SDK | Python | Kubiya Platform |
|---|---|---|
| 1.0.x | 3.8+ | v2.0+ |
| 0.9.x | 3.7+ | v1.5+ |