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.17.tar.gz
(2.8 MB
view details)
Built Distribution
kr8s-0.8.17-py3-none-any.whl
(40.2 kB
view details)
File details
Details for the file kr8s-0.8.17.tar.gz
.
File metadata
- Download URL: kr8s-0.8.17.tar.gz
- Upload date:
- Size: 2.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 306f94171dcb3cc573ccbb29ed4754127d77870df6b4d8b180ab816b17dd2a09 |
|
MD5 | 06a21c04588e8951a6bf3f4e5b84855b |
|
BLAKE2b-256 | 7542986ce6b103e9bad144a7f29d321d29ee964385707c76833052f64f90def7 |
Provenance
File details
Details for the file kr8s-0.8.17-py3-none-any.whl
.
File metadata
- Download URL: kr8s-0.8.17-py3-none-any.whl
- Upload date:
- Size: 40.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1fc3c99ba7decb56f82a314839411140ab41d484a73bd3fc45b953ab5b4da0e |
|
MD5 | 8f79a10e5be0b39a1147cd55f8379aee |
|
BLAKE2b-256 | da105bdc4ffbaad9632393ec317112fe4835374a83b6f3340b66a6f2619bc493 |