kubeflow
Kubeflow Python SDK to manage ML workloads and to interact with Kubeflow APIs.
What it is and what it does
Kubeflow SDK is a Python library that abstracts Kubernetes complexity to let you run distributed AI workloads—training jobs, hyperparameter sweeps, model registry operations, and ML pipelines—using familiar Python APIs. It unifies access to multiple Kubeflow components (Trainer, Katib, Model Registry, Spark Operator, Pipelines) through a single SDK, so you write Python code rather than YAML manifests or kubectl commands.
The SDK supports multiple execution backends: production Kubernetes clusters, local Docker/Podman containers for development, and Python subprocesses for quick prototyping. You define training jobs, optimization experiments, or pipelines in Python, submit them via client objects, and monitor their progress. Runtime dependencies include kubernetes (for cluster interaction), pydantic (for configuration validation), and requests (for HTTP calls).
Use it for:
- Submit distributed PyTorch or TensorFlow training jobs to a Kubernetes cluster without writing deployment manifests.
- Run hyperparameter optimization sweeps using Katib, specifying search spaces and trial counts in Python.
- Register and manage model versions in a Model Registry, tracking metadata and artifacts for production deployments.
- Prototype training logic locally using ContainerBackend or LocalProcessBackend before deploying to Kubernetes.
- Orchestrate multi-step ML pipelines with component definitions and run them on Kubeflow Pipelines.
- Execute Spark data processing jobs on Kubernetes via SparkClient with configurable executors and resources.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Kubeflow SDK provides Python APIs to submit and manage distributed AI training jobs, hyperparameter optimization, and ML pipelines on Kubernetes without requiring direct Kubernetes knowledge.
Yes. The SDK is actively maintained (release 4 days old), has no known vulnerabilities, uses a permissive Apache-2.0 license, and installs with low friction. It is the canonical way to interact with Kubeflow from Python if you are already running or planning to run Kubeflow on Kubernetes. Install it if you need to programmatically submit AI workloads to Kubeflow; skip it if you have no Kubernetes infrastructure or prefer direct kubectl/YAML workflows.
Install
kubeflow on PyPI
pip
pip install kubeflowuv
uv add kubeflowpoetry
poetry add kubeflowInstalling kubeflow
Before you install
Low friction install via pip with a pure-Python wheel. Actively maintained with a release 4 days old and recent commits; supports current Python versions (3.10, 3.11, 3.12).
License in practice
Apache-2.0 permissive license allows commercial use, modification, and distribution with minimal restrictions—suitable for proprietary projects.
Quickstart
pip install -U kubeflow
from kubeflow.trainer import TrainerClient, CustomTrainer, TrainJobTemplate
template = TrainJobTemplate(
runtime="torch-distributed",
trainer=CustomTrainer(func=train_fn, num_nodes=3)
)
job_id = TrainerClient().train(**template)
Requires Kubernetes cluster for production use; local development backends (Docker, Podman) available via optional extras (kubeflow[docker] or kubeflow[podman]).
Verify before relying
- Whether kubeflow-katib-api and kubeflow-trainer-api are bundled or must be installed separately.
- Performance characteristics and scaling limits for the number of concurrent training jobs or pipeline runs.
- Compatibility matrix between Kubeflow SDK versions and specific Kubernetes cluster versions.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — kubeflow-katib-api, kubeflow-trainer-api, kubernetes, pydantic, requests |
| Maintenance | actively maintained — 4 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 123,799/month — #11,900 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: kubeflow-0.5.0-py3-none-any.whl
Keywords: ai, kubeflow, llm, model training, trainer
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
hopsworksPython SDK for connecting to Hopsworks clusters…
permissive · top 15,000 on PyPI
kfpKubeflow Pipelines is a Python SDK for…
permissive · top 5,000 on PyPI
kfp-pipeline-specProvides the pipeline specification and…
permissive · top 5,000 on PyPI
kfp-server-apiProvides Python client bindings for the…
permissive · top 5,000 on PyPI
google-cloud-pipeline-componentsProvides predefined Kubeflow Pipelines…
permissive · top 5,000 on PyPI
kfp-kubernetesExtends Kubeflow Pipelines SDK with…
permissive · top 15,000 on PyPI
torchxTorchX is a universal job launcher that submits…
permissive · top 15,000 on PyPI
orion-py-clientA Python client for pushing ML feature data…
permissive · top 15,000 on PyPI
azureml-pipelineBuilds, optimizes, and manages machine learning…
unclear · top 15,000 on PyPI
kumoaiKumo SDK provides a Python interface to…
permissive · top 15,000 on PyPI