Skip to content

Friendlier OOP API? #998

Open
Open
@ramnes

Description

@ramnes

What is the feature and why do you need it:

I'd love to be able to do something like this:

from kubernetes.client import ExtensionsV1beta1Ingress as Ingress

...

for ingress in Ingress.list(namespace="default"):
    ingress.metadata.labels["foo"] = "bar"
    ingress.patch()

Describe the solution you'd like to see:

Implementing a bunch of default class methods and properties such as list and list_namespaced (or maybe list(namespace="...")), as well as instance methods such as delete and patch.

I know that this feature proposal is rather succinct, and I'm sorry about this, but I'd love some feedback before moving in any direction. Maybe this is too much of a change and would be simpler implemented in another library based on this client?

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.priority/awaiting-more-evidenceLowest priority. Possibly useful, but not yet enough support to actually get it done.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions