kubernetes-stubs-elephant-fork
Type stubs for the Kubernetes Python API client
What it is and what it does
This package provides type stub files (.pyi) for the Kubernetes Python API client library. Type stubs allow static type checkers like mypy and Pyright to understand the Kubernetes library's API surface, and they enable IDE features like autocomplete and inline documentation. The package exists as a fork because the upstream kubernetes-stubs project had not kept pace with Kubernetes releases; this fork automates stub generation to track new Kubernetes releases.
You install it alongside the main kubernetes package. It has no runtime dependencies and does not affect how your code runs—it only improves the development experience by making type information available to your tools. The maintainer uses GitHub Actions to detect new Kubernetes releases and automatically build corresponding stubs, so the package stays synchronized with the upstream library.
Use it for:
- Enable mypy or Pyright to type-check code that uses the Kubernetes Python client without false positives.
- Get IDE autocomplete and inline API documentation when writing Kubernetes client code in VSCode or PyCharm.
- Catch Kubernetes API usage errors at development time rather than at runtime.
- Maintain type safety in large projects that orchestrate or manage Kubernetes clusters via Python.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides type stubs for the Kubernetes Python API client, enabling static type checking and IDE autocompletion for Kubernetes library code.
Yes, if you use the Kubernetes Python client and want static type checking or IDE support. It has no runtime cost, low install friction, and is actively maintained. The main caveat is verifying that the stubs match your installed Kubernetes client version—check the fork's release notes to confirm coverage for your version.
Install
kubernetes-stubs-elephant-fork on PyPI
pip
pip install kubernetes-stubs-elephant-forkuv
uv add kubernetes-stubs-elephant-forkpoetry
poetry add kubernetes-stubs-elephant-forkInstalling kubernetes-stubs-elephant-fork
Before you install
Low install friction with no runtime dependencies. Actively maintained with recent releases; the maintainer runs automated builds to track new Kubernetes releases, so stubs stay current.
License in practice
Licensed under Apache-2.0 (permissive), so you can use this freely in commercial and open-source projects without significant restrictions.
Quickstart
pip install kubernetes-stubs-elephant-fork
# Then use with your type checker (mypy, pyright, etc.)
# Your IDE will now provide autocomplete for kubernetes library imports
import kubernetes.client
api = kubernetes.client.CoreV1Api()
Verify before relying
- Whether stubs cover all Kubernetes client versions >= 7.0 or only specific releases
- Compatibility with the main kubernetes package version you're using
- Whether this fork is actively maintained beyond the automated release tracking
Package facts
| License | Apache-2.0 (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 25 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 3,028,322/month — #2,782 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: kubernetes_stubs_elephant_fork-36.0.3.post1-py2.py3-none-any.whl
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
kubernetes-stubsProvides Python type stubs for the Kubernetes…
permissive · top 15,000 on PyPI
kubernetes-typedA mypy plugin that adds type checking support…
permissive · top 15,000 on PyPI
appdirs-stubsProvides type stubs for the appdirs package,…
permissive · top 15,000 on PyPI
k8Provides Python type models for Kubernetes…
permissive · top 15,000 on PyPI
asyncpg-stubsProvides type stubs for asyncpg to enable…
permissive · top 5,000 on PyPI
mypy-boto3Provides type stubs and annotations for boto3…
permissive · top 5,000 on PyPI
types-sqlalchemy-utilsProvides type stubs for sqlalchemy-utils,…
copyleft · top 5,000 on PyPI
scipy-stubsProvides type stubs for the entire SciPy…
permissive · top 5,000 on PyPI
confluent-kafka-stubsProvides type hints and stubs for the…
permissive · top 5,000 on PyPI
kubernetesProvides a Python interface to the Kubernetes…
permissive · top 1,000 on PyPI