skillfed

kubeflow

Kubeflow Python SDK to manage ML workloads and to interact with Kubeflow APIs.

kubeflow v0.5.0 123.8K downloads/30d#11,900 on PyPI140
Permissive license Apache-2.0 Active released

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 kubeflow

uv

uv add kubeflow

poetry

poetry add kubeflow

Installing 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

Intended Audience :: DevelopersIntended Audience :: EducationIntended Audience :: Science/ResearchLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Topic :: Scientific/EngineeringTopic :: Scientific/Engineering :: Artificial IntelligenceTopic :: Software DevelopmentTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python Modules

Tags

kubernetes machine learning trainingdistributed ai workload managementhyperparameter optimization pythonml pipeline orchestrationkubeflow python sdkmodel training kubernetesspark ml on kubernetes
kubernetesdistributed-trainingml-orchestration

More Software Development packages

Further reading