You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The idea would be to add type hints as described in PEP 484, decide on a type checker (like mypy, pyright, ...) and this to the CI and publish kubernetes as a typed package (by adding a magic py.typed file to the project).
With that, IDEs as was tools like mypy can help the user to pick the right types for functions, etc.
In my project, we use typed dataclasses to represent kubernetes's resources. Using typed dataclasses provides benefits such as type-based code completion and static checking. It would be nice if the official SDK supports such type hints.
An example of typed dataclasss generated from OpenAPI.
@roycaihw:
This request has been marked as needing help from a contributor.
Guidelines
Please ensure that the issue body includes answers to the following questions:
Why are we solving this issue?
To address this issue, are there any code changes? If there are code changes, what needs to be done in the code and what places can the assignee treat as reference points?
Does this issue have zero to low barrier of entry?
How can the assignee reach out to you for help?
For more details on the requirements of such an issue, please see here and ensure that they are met.
If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-help command.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.
Activity
muzakkirsaifi123 commentedon Mar 27, 2023
Hi @kasium
Could you please explain about it more.
kasium commentedon Mar 27, 2023
The idea would be to add type hints as described in PEP 484, decide on a type checker (like mypy, pyright, ...) and this to the CI and publish kubernetes as a typed package (by adding a magic
py.typedfile to the project).With that, IDEs as was tools like mypy can help the user to pick the right types for functions, etc.
roycaihw commentedon Mar 27, 2023
maybe this is a dup of #1984
k8s-triage-robot commentedon Jun 25, 2023
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
lifecycle/staleis appliedlifecycle/stalewas applied,lifecycle/rottenis appliedlifecycle/rottenwas applied, the issue is closedYou can:
/remove-lifecycle stale/closePlease send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
msw-kialo commentedon Nov 1, 2023
/remove-lifecycle stale
k8s-triage-robot commentedon Jan 31, 2024
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
lifecycle/staleis appliedlifecycle/stalewas applied,lifecycle/rottenis appliedlifecycle/rottenwas applied, the issue is closedYou can:
/remove-lifecycle stale/closePlease send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
k8s-triage-robot commentedon Mar 1, 2024
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
lifecycle/staleis appliedlifecycle/stalewas applied,lifecycle/rottenis appliedlifecycle/rottenwas applied, the issue is closedYou can:
/remove-lifecycle rotten/closePlease send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
msw-kialo commentedon Mar 18, 2024
/remove-lifecycle rotten
11 remaining items
msw-kialo commentedon Dec 2, 2024
/remove-lifecycle rotten
k8s-triage-robot commentedon Mar 2, 2025
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
lifecycle/staleis appliedlifecycle/stalewas applied,lifecycle/rottenis appliedlifecycle/rottenwas applied, the issue is closedYou can:
/remove-lifecycle stale/closePlease send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
ryanpeach commentedon Mar 4, 2025
/remove-lifecycle rotten
ryanpeach commentedon Mar 4, 2025
/remove-lifecycle stale
Hakuyume commentedon May 15, 2025
In my project, we use typed dataclasses to represent kubernetes's resources. Using typed dataclasses provides benefits such as type-based code completion and static checking. It would be nice if the official SDK supports such type hints.
An example of typed dataclasss generated from OpenAPI.
Note that we developed a generator to convert OpenAPI schemas to these dataclasses.
roycaihw commentedon Jun 6, 2025
/help
k8s-ci-robot commentedon Jun 6, 2025
@roycaihw:
This request has been marked as needing help from a contributor.
Guidelines
Please ensure that the issue body includes answers to the following questions:
For more details on the requirements of such an issue, please see here and ensure that they are met.
If this request no longer meets these requirements, the label can be removed
by commenting with the
/remove-helpcommand.Details
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.
tamird commentedon Jul 31, 2026
I think this is done now with:
and it's also a duplicate of #2608.
cc @yliaog
yliaog commentedon Jul 31, 2026
thanks @tamird for upgrading openapi generator to the latest, now the python client library has type hints. Please give it a try.