pyhelm3

raw JSON →
0.4.0 verified Fri May 01 auth: no python

A Python library for managing Helm releases using Helm 3. It wraps the Helm CLI to provide a programmatic interface for installing, upgrading, listing, and uninstalling Helm charts. Current version 0.4.0. Release cadence is irregular.

pip install pyhelm3
error FileNotFoundError: [Errno 2] No such file or directory: 'helm'
cause Helm CLI not installed or not in PATH.
fix
Install Helm 3 and ensure it's in your system PATH.
error pydantic.errors.PydanticImportError: `BaseSettings` has been moved to `pydantic-settings`
cause Project uses Pydantic v2 which moved BaseSettings to pydantic-settings package.
fix
Install pydantic-settings or pin to pyhelm3<0.2.0 if you need Pydantic v1.
error ModuleNotFoundError: No module named 'pyhelm3'
cause Package not installed.
fix
Run: pip install pyhelm3
breaking Version 0.2.0 changed from Pydantic v1 to v2. If you have custom models or validators that rely on Pydantic v1 behavior, upgrade carefully.
fix Ensure your code is compatible with Pydantic v2.
breaking Repository moved from stackhpc to azimuth-cloud in version 0.4.0. Update your remote if you have it as a git dependency.
fix Use https://github.com/azimuth-cloud/pyhelm3 instead of https://github.com/stackhpc/pyhelm3.
gotcha Helm CLI must be installed and available in PATH. The library does not bundle Helm.
fix Install Helm 3 via your package manager or from https://helm.sh/docs/intro/install/.
gotcha Empty values dict is returned as an empty dict (not None) starting from version 0.3.4. This may affect comparisons.
fix When comparing values, handle empty dict case explicitly.

Create a HelmReleases client, list releases, and install a chart.

import os
from pyhelm3 import HelmReleases

releases = HelmReleases()
# List all releases
for release in releases.list():
    print(release.name, release.status)

# Install a release
releases.install(
    'my-release',
    chart='stable/nginx-ingress',
    values={'controller.replicaCount': 2},
    namespace='default',
    atomic=True
)