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.12.tar.gz
(31.9 kB
view details)
Built Distribution
kr8s-0.8.12-py3-none-any.whl
(39.8 kB
view details)
File details
Details for the file kr8s-0.8.12.tar.gz
.
File metadata
- Download URL: kr8s-0.8.12.tar.gz
- Upload date:
- Size: 31.9 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 | ac61894ec5f483b3b7e93e82c8686cfb8398d97bacec6e4cad71477ec2117161 |
|
MD5 | 104c633159c885bd01c84de192db44f2 |
|
BLAKE2b-256 | b5291af845e877a6086ca005c7992376c1c75e0bbb4d2b6383ec78ffa5213fef |
Provenance
File details
Details for the file kr8s-0.8.12-py3-none-any.whl
.
File metadata
- Download URL: kr8s-0.8.12-py3-none-any.whl
- Upload date:
- Size: 39.8 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 | de5626c67ba5d2e23069879a6f7a8991201d0a75b4e71d3387c8a0e8231be8f7 |
|
MD5 | ac98637bbed4bbd46561c07fb32c656a |
|
BLAKE2b-256 | 888699091b0aa2d63ddf73e7a5cc338cd22883c46492f47bc36d36e20b6aba52 |