haxsaw/hikaru — reverse-engineered prompt
Reverse engineered prompt
Build me a Python library that makes Kubernetes configs easier to work with in normal Python.
I want to be able to load Kubernetes YAML, JSON, or Python dicts and turn them into typed Python objects, then edit them and write them back out as YAML, JSON, dicts, or generated Python source. It should also let me create Kubernetes resources directly in Python, use CRUD style methods against a cluster, and watch resources for changes.
Please support multiple Kubernetes API model versions, so people can choose the model that matches their cluster. Include helpers for inspecting objects, searching fields, checking types, comparing two configs, and merging changes where that makes sense.
Also include support for Custom Resource Definitions and a way to group several resources together as an application, similar to a chart, so the whole group can be created, read, updated, deleted, or watched together.
Add clear examples, tests, and documentation. Look up current Kubernetes Python docs online if you need to.
Want more depth? Deep Reverse