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.11.tar.gz
(31.6 kB
view details)
Built Distribution
kr8s-0.8.11-py3-none-any.whl
(39.6 kB
view details)
File details
Details for the file kr8s-0.8.11.tar.gz
.
File metadata
- Download URL: kr8s-0.8.11.tar.gz
- Upload date:
- Size: 31.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.0 CPython/3.11.0 Linux/5.15.0-1042-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d582ee44a0cb03b5975b3ea35406e48c16b06fffbbde8fd10c196272287651b |
|
MD5 | 0b746fe0dff3195279ef0802c78260a7 |
|
BLAKE2b-256 | f6ba72b1f0f45856b42cecb5115123af27165ba7372970a5f304515a3036a542 |
Provenance
File details
Details for the file kr8s-0.8.11-py3-none-any.whl
.
File metadata
- Download URL: kr8s-0.8.11-py3-none-any.whl
- Upload date:
- Size: 39.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.0 CPython/3.11.0 Linux/5.15.0-1042-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b47853dc9ebe1f8334bc46204d0ba08e5094d565bb9cde413c5656d809a57635 |
|
MD5 | 9d84df2fbea19b001c59c6dafbee36a7 |
|
BLAKE2b-256 | 51543dd722dab88deea647c6bf196555bd151b2c6294803f199fc21939d32c98 |