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.4.tar.gz
(29.9 kB
view details)
Built Distribution
kr8s-0.8.4-py3-none-any.whl
(37.9 kB
view details)
File details
Details for the file kr8s-0.8.4.tar.gz
.
File metadata
- Download URL: kr8s-0.8.4.tar.gz
- Upload date:
- Size: 29.9 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 | c0e498e9f18570c2b9599b709adbb18e152756b015d05dc9312156ff581b78d2 |
|
MD5 | 71ec2130b0de1a974b3bba866d2310f3 |
|
BLAKE2b-256 | c5f59e3b4e3cffddf5bc5a57b22ce9e4320719b09a79614af0cec120f6f3858d |
Provenance
File details
Details for the file kr8s-0.8.4-py3-none-any.whl
.
File metadata
- Download URL: kr8s-0.8.4-py3-none-any.whl
- Upload date:
- Size: 37.9 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 | 1d06ad4e4d52a2cb2485e4ce0a237b1206ba0098c60214805a2c1dc8c14a9dd8 |
|
MD5 | b755b4efe920e0c1769ad2daff962fdc |
|
BLAKE2b-256 | cab33fd869f0617a62aeaca43c70a00a21b0cd462b22c2822d7bc7e63c8d2ef5 |