helm-python-sdk — Helm v4 SDK for Python
Use Helm from Python: load and render charts, talk to OCI registries,
and install/upgrade/roll back releases — without the helm binary, a Go toolchain, or a
compiler.
It binds to libhelm_c (a C ABI over Helm's
official Go SDK) using ctypes from the standard library, so the package itself has zero
runtime dependencies.
A Python API for the Kubernetes package manager: everything the Helm CLI does with charts, repositories, and releases is callable as a typed Python function, backed by Helm's official Go SDK.
Status: published.
pip install helm-python-sdk— prebuilt wheels for Linux, macOS, and Windows on PyPI, plus a build-from-source sdist.
Install
pip install helm-python-sdk
The import name is helm_python.
The wheel bundles the native library for your platform, so nothing is compiled at install time and no environment variables need to be set.
Docker
A ready-to-use image with the SDK preinstalled (amd64; arm64 arrives with the linux-arm64 wheel):
docker build -t helm-python-sdk .
docker run -it --rm -v ~/.kube/config:/home/helm/.kube/config:ro helm-python-sdk python
Use it as a base for automation jobs: FROM helm-python-sdk, copy your
script, done. The SDK installs from PyPI as a prebuilt wheel — nothing
compiles in the image.
If no wheel matches your platform
Three options, resolved in this order:
-
Point at your own build — build helm-c-sdk (
make build, works anywhere Go runs) and set:export HELM_C_LIB=/path/to/libhelm_c.so # or .dylib / .dll, or its directory
-
Build during install — requires Go and a C compiler:
HELM_PYTHON_BUILD=1 pip install --no-binary helm-python-sdk helm-python-sdk
The source distribution vendors the pinned helm-c-sdk source, so nothing unpinned is fetched. The installer checks for Go, a C compiler, and
makefirst and names exactly what is missing rather than failing with a compiler error. -
Prebuilt wheel — the default when your platform is in the release matrix.
Usage
import helm_python as helm
with helm.Chart.load("./mychart") as chart:
chart.name, chart.version # 'mychart', '0.1.0'
chart.values # default values as a dict
chart.merge_values({"replicaCount": 3}) # what an install would really use
manifests = chart.render({"replicaCount": 3}, name="demo", namespace="prod")
print(manifests["mychart/templates/deployment.yaml"])
chart.validate_schema({"replicaCount": 3}) # against values.schema.json, if present
chart.save("./dist") # -> ./dist/mychart-0.1.0.tgz
Charts are handles into the native library. Use them as context managers (above) or call
close(); a forgotten chart is still released when it is garbage collected, and closing
twice is safe.
Module-level chart helpers:
helm.lint("./mychart") # findings are data, not exceptions
helm.package("./mychart", destination="./dist", version="1.2.3")
helm.verify("./dist/mychart-1.2.3.tgz", keyring="~/.gnupg/pubring.gpg")
helm.validate_release_name("my-release") # raises HelmInvalidArgError if unusable
helm.parse_set_string("image.tag=v2,ports={80,443}")
# {'image': {'tag': 'v2'}, 'ports': [80, 443]}
print(helm.helm_c_version(), helm.helm_sdk_version()) # 0.2.1 v4.2.3
Registries, repositories, and dependencies:
# HTTP chart repositories
helm.repo_index("https://charts.example.com")
helm.pull("mychart", repo_url="https://charts.example.com", destination="./dist")
# OCI registries
with helm.RegistryClient() as client:
client.login("registry.example.com", "user", "token")
client.push("./dist/mychart-1.0.0.tgz", "oci://registry.example.com/charts")
client.pull("oci://registry.example.com/charts/mychart", destination="./dist")
# Dependencies — no `helm repo add` needed; your Helm config is untouched
helm.dependency_update("./mychart")
helm.dependency_build("./mychart")
Releases:
with helm.Config(namespace="default") as cfg: # ~/.kube/config, or in-cluster
release = cfg.install("./mychart", "demo", {"replicaCount": 3}, wait="watcher", timeout=120)
print(release["revision"], release["status"]) # 1 deployed
cfg.upgrade("./mychart", "demo", {"replicaCount": 5})
cfg.history("demo") # every revision
cfg.get_values("demo") # {'replicaCount': 5}
cfg.rollback("demo", version=1)
cfg.uninstall("demo")
for item in cfg.list():
print(item["name"], item["revision"], item["status"])
Long operations can be cancelled from another thread:
ctx = helm.HelmContext()
threading.Timer(30, ctx.cancel).start()
try:
cfg.install(chart, "demo", context=ctx, wait="watcher", timeout=300)
except helm.HelmCancelledError:
...
Config accepts the whole Kubernetes connection surface — kubeconfig_path or inline
kubeconfig_content, kube_context, bearer kube_token, kube_apiserver, CA/TLS
settings, impersonation, throttling, namespace, and storage_driver (secret,
configmap, memory, sql).
Errors are a typed hierarchy rooted at HelmError, mapped from the ABI's error codes, and
several also subclass familiar builtins so existing except clauses keep working:
try:
helm.parse_set_string("a=1,,=x=")
except helm.HelmValuesError as exc: # also a ValueError
print(exc.code, exc.detail)
Logging
The library is silent until you ask for output:
import logging, helm_python as helm
logging.basicConfig(level=logging.INFO)
helm.enable_logging(logging.INFO) # call before creating a Config
...
helm.disable_logging()
Records arrive on the helm_python.native logger, so they filter and route like any other
Python logging. Callbacks arrive on library threads; nothing can propagate back into the
native code, so a broken handler cannot crash the process.
Why no library-path configuration is needed
The library is always loaded by absolute path — from inside the installed package, or
from HELM_C_LIB — never by bare name through the OS loader search path. Nothing needs to
be added to LD_LIBRARY_PATH, DYLD_LIBRARY_PATH, or PATH, moving a virtualenv does not
break imports, and installing this package never modifies your system configuration.
Development
pip install -e ".[dev]"
python scripts/check_native_table.py ../helm-c/include/helm_c.h # signature drift gate
pytest # includes the leak gate
ruff check . && ruff format --check . && mypy
Tests locate a sibling helm-c checkout's build/ directory automatically; otherwise set
HELM_C_LIB.
Releasing
Wheels must be built from the source tree, not from the sdist, or the bundled library is dropped:
python scripts/fetch_native_lib.py --release v0.2.1 # or --from-dir ../helm-c/build
python -m build --wheel # NOT `python -m build`
python scripts/tag_wheel.py dist/*.whl # refuses a wheel with no library
CI does this per platform and smoke-tests every wheel in a clean virtualenv.
License
Apache-2.0. Copyright 2026 Shivam Kumar.
Metadata
Release files for helm-python-sdk 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| helm_python_sdk-0.2.2.tar.gz | 225.8 kB | With provenance | Details for helm_python_sdk-0.2.2.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| helm_python_sdk-0.2.2-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details for helm_python_sdk-0.2.2-py3-none-win_amd64.whl |
| helm_python_sdk-0.2.2-py3-none-manylinux_2_28_x86_64.whl | Python 3 | none | Linux glibc 2.28+ x86-64 | Details for helm_python_sdk-0.2.2-py3-none-manylinux_2_28_x86_64.whl |
| helm_python_sdk-0.2.2-py3-none-manylinux_2_28_aarch64.whl | Python 3 | none | Linux glibc 2.28+ ARM64 | Details for helm_python_sdk-0.2.2-py3-none-manylinux_2_28_aarch64.whl |
| helm_python_sdk-0.2.2-py3-none-macosx_15_0_x86_64.whl | Python 3 | none | macOS 15.0+ x86-64 | Details for helm_python_sdk-0.2.2-py3-none-macosx_15_0_x86_64.whl |
| helm_python_sdk-0.2.2-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details for helm_python_sdk-0.2.2-py3-none-macosx_11_0_arm64.whl |
Total release size: 347.2 MB
Release files / helm_python_sdk-0.2.2.tar.gz
| Download URL | helm_python_sdk-0.2.2.tar.gz |
|---|---|
| Size | 225.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aca9675b9e1875c572be2b99986c1e81b4d40831797774ad6962781036a7546d
|
|
BLAKE2b-256 checksum How to use checksums |
723b59ae89b1de87db71751825e85976fcc5dba52b8568cd202d5c69e5588c56
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 15, 2026.
Transparency logRelease files / helm_python_sdk-0.2.2-py3-none-win_amd64.whl
| Download URL | helm_python_sdk-0.2.2-py3-none-win_amd64.whl |
|---|---|
| Size | 71.6 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
ee16ba35eea156bf93a791b39381fdf848e5f4935835474005e06c78420b79ae
|
|
BLAKE2b-256 checksum How to use checksums |
332af71614f4ceae1092136ebdd2adbdb50b6967a9a5919d2e3238626e514a2d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 15, 2026.
Transparency logRelease files / helm_python_sdk-0.2.2-py3-none-manylinux_2_28_x86_64.whl
| Download URL | helm_python_sdk-0.2.2-py3-none-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 75.0 MB |
| Tags | Linux glibc 2.28+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
28cc13abaf134c3a7e37f070c939be8d9cdc9825c3c8b8b2d35161073bcd4578
|
|
BLAKE2b-256 checksum How to use checksums |
809b1dd16f72d63c272593e9dea1428532d07da8d95d296b1e94733ff50c12a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 15, 2026.
Transparency logRelease files / helm_python_sdk-0.2.2-py3-none-manylinux_2_28_aarch64.whl
| Download URL | helm_python_sdk-0.2.2-py3-none-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 67.8 MB |
| Tags | Linux glibc 2.28+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
078bac2464ea2f4b5af24cf7873e8f78ee3f3c216766fcdea41b7c61f47275b1
|
|
BLAKE2b-256 checksum How to use checksums |
6babe604c168725e27498dc5aa946ed966a394977f202377e36336ad6d9e0909
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 15, 2026.
Transparency logRelease files / helm_python_sdk-0.2.2-py3-none-macosx_15_0_x86_64.whl
| Download URL | helm_python_sdk-0.2.2-py3-none-macosx_15_0_x86_64.whl |
|---|---|
| Size | 69.0 MB |
| Tags | Python 3 macOS 15.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
6119b40eaac5cc23d2c25d3da91848df477f8b347d6226ee7b5680c46164716f
|
|
BLAKE2b-256 checksum How to use checksums |
7986d736fb77967bd885e58ef643865e3f0fcbe9adaece3b6836607b5b65e24a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 15, 2026.
Transparency logRelease files / helm_python_sdk-0.2.2-py3-none-macosx_11_0_arm64.whl
| Download URL | helm_python_sdk-0.2.2-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 63.7 MB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
16fd94117e4bc8c6f854801bda6fd84fceb608e083bc5333f8f934e79bd3dcdf
|
|
BLAKE2b-256 checksum How to use checksums |
17ccd88160ab58fe71dcfbc17300b2c41cee8c9d42b51822edf464e34f5e3c8c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 15, 2026.
Transparency logSecurity for helm-python-sdk 0.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 6 files in this release have been uploaded with provenance metadata.
Attestation for helm_python_sdk-0.2.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 15, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.