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.7.tar.gz
(31.2 kB
view details)
Built Distribution
kr8s-0.8.7-py3-none-any.whl
(39.1 kB
view details)
File details
Details for the file kr8s-0.8.7.tar.gz
.
File metadata
- Download URL: kr8s-0.8.7.tar.gz
- Upload date:
- Size: 31.2 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 | 4e782233538f1b65996dcce35b37180e846a8181c2ccad5cfce21f9c9b138b64 |
|
MD5 | 00cd3fbd5977f3baacc5f47ff43c2326 |
|
BLAKE2b-256 | 62399ec5e2ab891382a2b4f9dc00499fe43e702ec3d61a2f4360699b4f27ff10 |
Provenance
File details
Details for the file kr8s-0.8.7-py3-none-any.whl
.
File metadata
- Download URL: kr8s-0.8.7-py3-none-any.whl
- Upload date:
- Size: 39.1 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 | dbc4d5f7bac17698e9de4dc649eb9bf52e3c44291598022be62654f57e13757d |
|
MD5 | 931e040ea365ea3ea493f18d8cf68915 |
|
BLAKE2b-256 | 8a0debeb28fc175ccc2defcd3e63e923944a2313f4ef03b4ffb5ec5d01add6ef |