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.
- Supports both async/await and sync APIs.
- 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
api = kr8s.api()
pods = api.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.7.0.tar.gz
(28.3 kB
view details)
Built Distribution
kr8s-0.7.0-py3-none-any.whl
(35.4 kB
view details)
File details
Details for the file kr8s-0.7.0.tar.gz
.
File metadata
- Download URL: kr8s-0.7.0.tar.gz
- Upload date:
- Size: 28.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.0 CPython/3.11.0 Linux/5.15.0-1040-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | edc78dfa671344422fe99be9cced01396f8c3668012ca1705bbf53423fddca90 |
|
MD5 | 1d010f775951a47ccd2dee38791c0a4e |
|
BLAKE2b-256 | 9dfa5debde1f7a66f1383256e7b139616d2511d5a4c40368d510162602491711 |
Provenance
File details
Details for the file kr8s-0.7.0-py3-none-any.whl
.
File metadata
- Download URL: kr8s-0.7.0-py3-none-any.whl
- Upload date:
- Size: 35.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.0 CPython/3.11.0 Linux/5.15.0-1040-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0be446825722930f23530f945644b026855d0f23ad2b47b6da76fa9e39809175 |
|
MD5 | fb3a78da38a9f2c764faef29e5e16a36 |
|
BLAKE2b-256 | c11062421f32dde36f80de4c7b060f5911979bc4e53f8d0ccccb1c417e079d87 |