Python bindings for the Helm v4 Go library. Ships with a self-contained Go shim that bundles the native Helm runtimeβno system dependencies required.
- π Complete Helm API - Full access to Helm v4 functionality
- β‘ Async-First - All operations use async/await for non-blocking execution
- π¦ Self-Contained - No system dependencies required
- π Type-Safe - Python type hints for better IDE support
- π Pythonic API - Intuitive, object-oriented interface
- π― Production Ready - Based on official Helm Go libraries
- π Concurrent - Execute multiple operations simultaneously with asyncio
Note: helm-sdkpy uses an async-first API. All operations must be awaited. This enables non-blocking execution and concurrent operations with asyncio.gather().
pip install helm-sdkpyimport asyncio
import helm-sdkpy
async def main():
# Create a configuration
config = helm-sdkpy.Configuration(namespace="default")
# Install a chart from a local path
install = helm-sdkpy.Install(config)
result = await install.run(
release_name="my-nginx",
chart_path="./nginx-chart",
values={"replicaCount": 3}
)
print(f"Installed: {result['name']}")
# Install a chart from an OCI registry
result = await install.run(
release_name="my-app",
chart_path="oci://ghcr.io/nginxinc/charts/nginx-ingress",
values={"controller": {"service": {"type": "LoadBalancer"}}}
)
print(f"Installed: {result['name']}")
# Install a chart from an HTTPS URL
result = await install.run(
release_name="my-release",
chart_path="https://charts.bitnami.com/bitnami/nginx-15.0.0.tgz",
values={"replicaCount": 2}
)
print(f"Installed: {result['name']}")
# List releases
list_action = helm-sdkpy.List(config)
releases = await list_action.run(all=True)
for release in releases:
print(f"Release: {release['name']}")
# Upgrade a release
upgrade = helm-sdkpy.Upgrade(config)
result = await upgrade.run(
release_name="my-nginx",
chart_path="./nginx-chart",
values={"replicaCount": 5}
)
# Uninstall a release
uninstall = helm-sdkpy.Uninstall(config)
result = await uninstall.run("my-nginx")
asyncio.run(main())Take advantage of Python's asyncio to run multiple Helm operations concurrently:
import asyncio
import helm-sdkpy
async def deploy_multiple_apps():
config = helm-sdkpy.Configuration(namespace="default")
install = helm-sdkpy.Install(config)
# Install multiple charts concurrently
results = await asyncio.gather(
install.run("app-1", "oci://registry.io/chart1"),
install.run("app-2", "oci://registry.io/chart2"),
install.run("app-3", "oci://registry.io/chart3"),
)
for result in results:
print(f"Deployed: {result['name']}")
asyncio.run(deploy_multiple_apps())helm-sdkpy supports multiple chart location formats:
Point to a chart directory or packaged chart (.tgz) on your local filesystem:
chart_path="./nginx-chart" # Local directory
chart_path="/path/to/mychart" # Absolute path
chart_path="./mychart-1.0.0.tgz" # Packaged chartReference charts stored in OCI-compatible container registries:
chart_path="oci://ghcr.io/nginxinc/charts/nginx-ingress"
chart_path="oci://registry.example.com/charts/myapp"Download charts directly from web servers:
chart_path="https://charts.bitnami.com/bitnami/nginx-15.0.0.tgz"
chart_path="https://example.com/charts/myapp-1.2.3.tgz"- Configuration - Manage Helm configuration and Kubernetes connection
- Install - Install charts to Kubernetes (async)
- Upgrade - Upgrade existing releases (async)
- Uninstall - Remove releases from cluster (async)
- List - List deployed releases (async)
- Status - Get release status information (async)
- Rollback - Rollback to previous release versions (async)
- GetValues - Retrieve release values (async)
- History - View release history (async)
- Pull - Download charts from repositories (async)
- Show - Display chart information and values (async)
- Test - Run release tests (async)
- Lint - Validate charts for errors (async)
- Package - Package charts into archives (async)
All methods use async def and must be awaited. This enables non-blocking operations
and concurrent execution with asyncio.gather().
- Python 3.12+
- Docker (for building the native library)
- just task runner (optional but recommended)
git clone https://github.com/vantagecompute/helm-sdkpy.git
cd helm-sdkpy
# Build native library using Docker
just build-lib
# Install in development mode
pip install -e .# Run test suite
just unit
# Run linting
just lint
# Run type checking
just typecheckThe project uses just for task automation:
# Install just
sudo snap install just --classicAvailable commands:
just build-lib- Build native library (Docker)just unit- Run tests with coveragejust lint- Check code stylejust typecheck- Run static type checkingjust fmt- Format code
See the examples/ directory for more usage examples.
helm-sdkpy follows the same architecture as dqlitepy:
- Go Shim Layer - Exposes Helm v4 API via C FFI
- Python FFI - CFFI bindings to Go shared library
- Python API - Pythonic wrapper classes
This ensures type safety, excellent performance, and seamless integration with the official Helm libraries.
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Copyright 2025 Vantage Compute
Contributions welcome! Please ensure:
- Code follows existing style (ruff formatting)
- Tests pass and coverage is maintained
- Type hints are included
- Documentation is updated
- GitHub Issues - Bug reports and feature requests
- Examples - Sample code and use cases