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

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

Uploaded Source

Built Distribution

kr8s-0.8.10-py3-none-any.whl (39.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: kr8s-0.8.10.tar.gz
  • Upload date:
  • Size: 31.5 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.10.tar.gz
Algorithm Hash digest
SHA256 8ced9739a48f0993156c7ed4ac33eb0bd9bd661cb24c4c366dfeb6258ecd5968
MD5 6a67be69fd9dbd9ba91281395137b16b
BLAKE2b-256 8ef48283dcac5816151406707ca69bb36f45bda5a6956e98be3cad0cf916d429

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: kr8s-0.8.10-py3-none-any.whl
  • Upload date:
  • Size: 39.5 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.10-py3-none-any.whl
Algorithm Hash digest
SHA256 bcd8086362f40923a4cb4ff5b611d42edbdd97955bc1e53839819baad50b427e
MD5 05f9a609dc3ebb039f66963ae0d5089d
BLAKE2b-256 77e8384a2f89c760d84b5dc8eeac3a7c6009dd1dc5f9d1d9184abbcf12573ea5

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