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.
  • Supports both async/await and sync APIs.
  • 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

api = kr8s.api()
pods = api.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.6.0.tar.gz (27.4 kB view details)

Uploaded Source

Built Distribution

kr8s-0.6.0-py3-none-any.whl (34.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: kr8s-0.6.0.tar.gz
  • Upload date:
  • Size: 27.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.0 CPython/3.11.0 Linux/5.15.0-1040-azure

File hashes

Hashes for kr8s-0.6.0.tar.gz
Algorithm Hash digest
SHA256 0308937d0eaba89bd9b7acf976866cdf8a36568872a3263a9447293d4d14e431
MD5 f76cafd3d7b24c2931f084121afff647
BLAKE2b-256 6f6f7d62f7b6e5cb36b20181a34afef7dbefae38ceac91ee777dd20ded08e1df

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: kr8s-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 34.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.0 CPython/3.11.0 Linux/5.15.0-1040-azure

File hashes

Hashes for kr8s-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7f414cf2ffa2f83caf35f306f416a2ccdb1eefe1592eab429bbadb0f5871d10f
MD5 1d58a813d9316b77b9f973c1edc8879d
BLAKE2b-256 30276f9ef6d09961370d4035d8d84eb5e9d825bf96cdafbbf89bd2f4fc13a29c

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