skillfed

kubernetes-stubs-elephant-fork

Type stubs for the Kubernetes Python API client

kubernetes-stubs-elephant-fork v36.0.3.post1 3.0M downloads/30d#2,782 on PyPI12
Permissive license Apache-2.0 Active released

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-fork

uv

uv add kubernetes-stubs-elephant-fork

poetry

poetry add kubernetes-stubs-elephant-fork

Installing 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

License :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

kubernetes type stubskubernetes python typingkubernetes api type hintskubernetes static type checkingkubernetes mypy stubskubernetes ide autocompletetype stubs kubernetes client
type-stubskubernetesstatic-typing

More Software Development packages