kubernetes-stubs
Type stubs for the Kubernetes Python API client
What it is and what it does
kubernetes-stubs is a type-stub package that mirrors the Kubernetes Python API client's public interface, allowing static type checkers and IDEs to understand the types and signatures of client calls. Type stubs are metadata-only files that describe what types a library exposes; they don't add runtime behavior.
The package is useful if you write type-checked Python code that uses the Kubernetes client library. Its version numbers track the upstream package, so version 22.6.0.post1 corresponds to Kubernetes client 22.6.0. However, the package has not been updated since 2022-04-20 and is no longer maintained, meaning it will not reflect API changes in newer client releases.
Use it for:
- Enable type checking in scripts that call the Kubernetes Python client
- Get IDE autocompletion and inline type hints when writing Kubernetes client code
- Verify at development time that your API calls match the client's expected signatures
- Maintain a typed codebase that depends on the Kubernetes client without type errors
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides Python type stubs for the Kubernetes API client, enabling static type checking and IDE autocompletion when working with the upstream kubernetes package.
Yes, if you are using Kubernetes client version 22.6.x and need type checking support. No, if you use a newer client version—the stubs are outdated and will not reflect current API. Check whether the upstream package now includes inline type hints or whether an actively maintained alternative exists before installing.
Install
kubernetes-stubs on PyPI
pip
pip install kubernetes-stubsuv
uv add kubernetes-stubspoetry
poetry add kubernetes-stubsInstalling kubernetes-stubs
Before you install
Installation is straightforward with no runtime dependencies. However, the package is abandoned—last release was 1577 days ago—so it will not track upstream Kubernetes API changes or receive maintenance.
License in practice
Licensed under Apache-2.0 (permissive), so you can use it freely in commercial and open-source projects without copyleft obligations.
Quickstart
pip install kubernetes-stubs
Verify before relying
- Whether these stubs remain accurate for current versions of the Kubernetes Python API client
- Compatibility with Python versions beyond 3.10 (the newest explicitly declared in classifiers)
Package facts
| License | Apache-2.0 (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | abandoned — 1,577 days since the last release |
| First released | |
| Downloads | 654,583/month — #5,522 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: kubernetes_stubs-22.6.0.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-stubs-elephant-forkProvides type stubs for the Kubernetes Python…
permissive · top 5,000 on PyPI
kubernetes-typedA mypy plugin that adds type checking support…
permissive · top 15,000 on PyPI
lightkube-modelsProvides Python type definitions and model…
permissive · top 15,000 on PyPI
k8Provides Python type models for Kubernetes…
permissive · top 15,000 on PyPI
kubernetesProvides a Python interface to the Kubernetes…
permissive · top 1,000 on PyPI
kubernetes-asyncioAsynchronous Python client for the Kubernetes…
permissive · top 5,000 on PyPI
asyncpg-stubsProvides type stubs for asyncpg to enable…
permissive · top 5,000 on PyPI
pykube-ngpykube-ng is a Python client library for…
permissive · top 15,000 on PyPI
kubernetes-validateValidates Kubernetes resource definitions…
permissive · top 15,000 on PyPI
scipy-stubsProvides type stubs for the entire SciPy…
permissive · top 5,000 on PyPI