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.15.tar.gz
(32.0 kB
view details)
Built Distribution
kr8s-0.8.15-py3-none-any.whl
(39.9 kB
view details)
File details
Details for the file kr8s-0.8.15.tar.gz
.
File metadata
- Download URL: kr8s-0.8.15.tar.gz
- Upload date:
- Size: 32.0 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 | 305376deac74134b3cfb634bbde66411fc37f041254101af54f57b7e47d09263 |
|
MD5 | d0aad3978ef4f8df43dce5fa4e1be05c |
|
BLAKE2b-256 | 0b8a737a8eb3af7bfa6a2de76586bae3a5bfcba2b802ebc9a530a53fe21016af |
Provenance
File details
Details for the file kr8s-0.8.15-py3-none-any.whl
.
File metadata
- Download URL: kr8s-0.8.15-py3-none-any.whl
- Upload date:
- Size: 39.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 | c0edb7576475703938f64cf3351a704df2b37c8328e8a2f298fc33340c0628df |
|
MD5 | dfbf90e18fc3bb310b8af9d76ab58b01 |
|
BLAKE2b-256 | 3e23786c1d9bdfed2473c894134f799b4a15fa525b298665f348a91ce4ea9bc4 |