--- id: kubernetes-typed version: "18.20.2" license: Apache License Version 2.0 license_treatment: permissive maintenance: dormant --- # kubernetes-typed — Collection of mypy plugins and stubs for kubernetes License: permissive · Maintenance: dormant · Downloads: 171.4K/mo ## What it is and what it does kubernetes-typed is a mypy plugin that generates type definitions for Kubernetes objects at static analysis time. It works in two modes: it can type-check custom resource definitions by reading their YAML schemas and generating TypedDict types, or it can provide type stubs for the kubernetes-client library to enable type checking of standard Kubernetes objects. The plugin integrates directly into mypy's type-checking pipeline, allowing developers to catch type errors in Kubernetes manifests and client code before runtime. The package depends on mypy, jsonschema, PyYAML, mypy-extensions, and jsonschema-typed-v2. It supports Python 3.8 through 3.12 and follows the kubernetes-client versioning scheme, so the MAJOR.MINOR version matches the client version for which stubs were generated. It is currently in beta and dormant—no active development is expected, though the repository is not archived. Use it for: - Type-check custom resource definitions in YAML files to catch schema violations early in development - Enable IDE autocomplete and type hints when working with kubernetes-client library classes - Validate Kubernetes manifest dictionaries before submitting them to the API - Catch typos and incorrect field names in Pod, Deployment, and other standard resource specs - Enforce consistent typing across a team's Kubernetes automation and operator code ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. A mypy plugin that adds type checking support for Kubernetes objects, including custom resource definitions and the kubernetes-client library. Yes, if you use mypy for Python Kubernetes tooling and want type safety for manifests and client code. The low install friction and permissive license make it a straightforward addition to a mypy workflow. However, dormant maintenance and known limitations mean it is best suited for stable, non-bleeding-edge use cases. No known security vulnerabilities. ## Install pip install kubernetes-typed uv add kubernetes-typed poetry add kubernetes-typed ## Installing kubernetes-typed Before you install: Low install friction with a pure-wheel distribution. Maintenance is dormant—last release was 711 days ago, though the repository remains active with a recent commit on 2024-09-08. Suitable for stable use but expect no active development. License in practice: Apache License Version 2.0 is permissive, allowing commercial and private use with minimal restrictions beyond attribution and liability disclaimers. Quickstart: pip install kubernetes-typed # Configure mypy to use the plugin: # [mypy] # plugins = kubernetes_typed.plugin from kubernetes_typed.client import V1PodDict pod_manifest: V1PodDict = { "apiVersion": "v1", "kind": "Pod", "metadata": {"name": "test-pod"}, } Requires mypy to be installed and configured; CRDs using additionalProperties are not supported. Verify before relying: - Whether the plugin works reliably with mypy versions beyond those tested during development - Performance impact when type-checking large numbers of custom resources - Compatibility with recent kubernetes-client library versions ## Package facts - License: Apache License Version 2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: dormant - Downloads: 171.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags kubernetes type checking mypy, mypy plugin kubernetes, custom resource definition typing, kubernetes python client types, k8s type stubs, kubernetes crd type hints, mypy kubernetes plugin, kubernetes, type-checking, mypy-plugin [View on SkillFed](https://skillfed.io/packages/kubernetes-typed) · [View on PyPI](https://pypi.org/project/kubernetes-typed/)