Skip to main content

PyHelm

Python bindings for the Helm package manager

How to use PyHelm

In order to install a Helm chart using PyHelm, you can perform the following steps:

Loading a chart using ChartBuilder

from pyhelm.chartbuilder import ChartBuilder

chart = ChartBuilder({"name": "nginx-ingress", "source": {"type": "repo", "location": "https://kubernetes-charts.storage.googleapis.com"}})

This will cause the chart to cloned locally, and any additional use of chart will reference the local copy. You can also used a local chart by using "type": "directory", as well as cloning from a git repo using "type": "git"

Installing a chart

from pyhelm.chartbuilder import ChartBuilder
from pyhelm.tiller import Tiller

tiller = Tiller(TILLER_HOST)
chart = ChartBuilder({"name": "nginx-ingress", "source": {"type": "repo", "location": "https://kubernetes-charts.storage.googleapis.com"}})
tiller.install_release(chart.get_helm_chart(), dry_run=False, namespace='default')

This snippet will install the nginx-ingress chart on a Kubernetes cluster where Tiller is installed (assuming TILLER_HOST points to a live Tiller instance). Take note that in most Helm installations Tiller isn’t accessible in such a manner, and you will need to perform a Kubernetes port-forward operation to access Tiller. The Tiller class supports other operations other than installation, including release listing, release updating, release uninstallation and getting release contents.

Package versions

In order to support multiple versions of Helm versions, which in turn require different gRPC prototypes, we maintain different PyHelm package versions.

Helm version

PyHelm dependency version

2.11 (and lower)

pyhelm>=2.11,<2.12

2.14

pyhelm>=2.14,<2.15

Additional Helm versions can be supported as shown in the following section.

Helm gRPC

The helm gRPC libraries are located in the hapi directory. They were generated with the grpc_tools.protoc utility against Helm 2.14. Should you wish to re-generate them you can easily do so:

git clone https://github.com/kubernetes/helm ./helm
python -m grpc_tools.protoc -I helm/_proto --python_out=. --grpc_python_out=. _proto/hapi/chart/*
python -m grpc_tools.protoc -I helm/_proto --python_out=. --grpc_python_out=. _proto/hapi/services/*
python -m grpc_tools.protoc -I helm/_proto --python_out=. --grpc_python_out=. _proto/hapi/release/*
python -m grpc_tools.protoc -I helm/_proto --python_out=. --grpc_python_out=. _proto/hapi/version/*

Release files for pyhelm 2.14.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyhelm 2.14.5
File Size Uploaded
pyhelm-2.14.5.tar.gz 34.2 kB Details

Release files / pyhelm-2.14.5.tar.gz

Download URL pyhelm-2.14.5.tar.gz
Size 34.2 kB
Tags Source
SHA-256 checksum
How to use checksums
b58450145d6d97e2a091f8b8be312e8fbc3a01eab213142a2e07a73c9c926ca3
BLAKE2b-256 checksum
How to use checksums
fc437d3b9e536ca3175f3dc2cc4f1760d4dea5711508fe0129cf11c500189260
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.15
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page