Skip to main content

A Kubernetes API library

Project description

Test Codecov pre-commit.ci status Read the Docs PyPI PyPI - Python Version Kubernetes Version Support PyPI - Wheel PyPI - License

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 and trio.
  • 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

This version

0.8.2

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.2.tar.gz (29.9 kB view details)

Uploaded Source

Built Distribution

kr8s-0.8.2-py3-none-any.whl (37.8 kB view details)

Uploaded Python 3

File details

Details for the file kr8s-0.8.2.tar.gz.

File metadata

  • Download URL: kr8s-0.8.2.tar.gz
  • Upload date:
  • Size: 29.9 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

Hashes for kr8s-0.8.2.tar.gz
Algorithm Hash digest
SHA256 1157da6c6f03d38fc3b06bd5dc1b7bc0d39c20279f0e8e38e78c39b0eefde99e
MD5 df1a04b2fac78122a4fad899c43a0eae
BLAKE2b-256 96b84b0819ca3e4a6fe6693b30ab6285f35823ae3b654e9f535e29d0a05e7bb5

See more details on using hashes here.

Provenance

File details

Details for the file kr8s-0.8.2-py3-none-any.whl.

File metadata

  • Download URL: kr8s-0.8.2-py3-none-any.whl
  • Upload date:
  • Size: 37.8 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

Hashes for kr8s-0.8.2-py3-none-any.whl
Algorithm Hash digest
SHA256 28b35b78be4d56a401b9656f3af2be2e24209cfd0cdac3b6579d0d3364096754
MD5 ff1e41ce8d3b4b9dd5bbc5460c122d90
BLAKE2b-256 16dd1a04faeb976c26077b4ed6d8885e0ee702734073a9ab1bf5ca8acd1bd523

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page