Skip to main content

Kubernetes Python Exploration Tool

Command line tool to explore the Kubernetes API using Python expressions

PyPi Code style: black

Motivation

Explore the Kubernetes API by using «k8s tailored» REST client while supporting Python expressions for formatting and filterting data.

Install

pip install kpet

Usage examples

Show the current kubernetes context configuration (detected from your KUBECONFIG file)

kpet show

List all the API endpoints

kpet get

Get the kubernetes API server version

kpet get version

Get the list of nodes

kpet get api/v1/nodes

Get the PodIP for all pods, check the special symbols for other symbols.

kpet get api/v1/pods -f "{name} is using IP {_s.podIP}"

Print the name for all running pods

kpet get api/v1/pods -f"{name}" -s "_s.phase=='Running'"

Print the name for all nodes which are Ready

kpet get api/v1/nodes -f"{name}" -s "[c for c in _s['conditions'] if c.type=='Ready' and c.status=='True']"

Metadata

Release files for kpet 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kpet 0.0.2
File Size Uploaded
kpet-0.0.2.tar.gz 9.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for kpet 0.0.2
File Interpreter ABI Platform
kpet-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 18.7 kB

Release files / kpet-0.0.2.tar.gz

Download URL kpet-0.0.2.tar.gz
Size 9.7 kB
Tags Source
SHA-256 checksum
How to use checksums
b23df8f3a65fd8e79a9026b146de11843c2065cea390d1e6d64dced6cb2f4e13
BLAKE2b-256 checksum
How to use checksums
f77b5c34ee89e50bc40c1baa75a93474c17498bc580422c05e4056d76948d9fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / kpet-0.0.2-py3-none-any.whl

Download URL kpet-0.0.2-py3-none-any.whl
Size 9.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b43b256b4c001ceb98d653d84593420528f69a1ad7c3eec6c1198f20540cb376
BLAKE2b-256 checksum
How to use checksums
e0d769685ee6cd582335c7c530ddc7fc4b2d095945a443f09e1c1e575ed7a8a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page