A Kubernetes API library
Project description
A simple, extensible Python client library for Kubernetes that feels familiar for folks who already know how to use kubectl
.
Highlights
- API inspired by
kubectl
to reduce developer learning curve. - Sensible defaults to reduce boiler plate.
- No swagger generated code, human readable code only.
- Also has an asynchronous API that can be used with
asyncio
andtrio
. - Client caching to reduce passing API objects around.
- Batteries included by providing useful utilities and methods inspired by
kubectl
.
Quickstart
Installation
$ pip install kr8s
Client API
import kr8s
pods = kr8s.get("pods")
See the Client API docs for more examples.
Object API
from kr8s.objects import Pod
pod = Pod({
"apiVersion": "v1",
"kind": "Pod",
"metadata": {
"name": "my-pod",
},
"spec": {
"containers": [{"name": "pause", "image": "gcr.io/google_containers/pause",}]
},
})
pod.create()
See the Object API docs for more examples.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
kr8s-0.8.5.tar.gz
(30.3 kB
view details)
Built Distribution
kr8s-0.8.5-py3-none-any.whl
(38.3 kB
view details)
File details
Details for the file kr8s-0.8.5.tar.gz
.
File metadata
- Download URL: kr8s-0.8.5.tar.gz
- Upload date:
- Size: 30.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.0 CPython/3.11.0 Linux/5.15.0-1041-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3164480e8977e5b62a08c810fa0e991218c5a6376f2b3c862f274a93dfa7656c |
|
MD5 | 2cfe13ef5f40c338d2e1a1e62eda0fe8 |
|
BLAKE2b-256 | 727ea63ebec12ffd32a47c22c028c0c22ac00d41419c744370e2b3f51e4ad134 |
Provenance
File details
Details for the file kr8s-0.8.5-py3-none-any.whl
.
File metadata
- Download URL: kr8s-0.8.5-py3-none-any.whl
- Upload date:
- Size: 38.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.0 CPython/3.11.0 Linux/5.15.0-1041-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 615a975fa95113b0b7f4ef2fedd0a662b3db1dee120c1c7a115003f491111ddd |
|
MD5 | 795bec2a84a81048e50edc74b74c1980 |
|
BLAKE2b-256 | 5c888477833ea4e409180e00ba412e649f1001ab97664fa0c29c8ea34a673e8c |