--- id: pykube-ng version: "23.6.0" license: Apache license_treatment: permissive maintenance: abandoned --- # pykube-ng — Python client library for Kubernetes License: permissive · Maintenance: abandoned · Downloads: 252.9K/mo ## What it is and what it does pykube-ng is a lightweight Python client for Kubernetes that wraps the Kubernetes API in native Python objects. It uses requests for HTTP communication and kubeconfig for authentication, allowing you to query, filter, create, and delete Kubernetes resources (Pods, Deployments, Jobs, etc.) programmatically. The library exposes Kubernetes objects as Python classes with methods for common operations like filtering by namespace or selector, watching for changes, and accessing raw API attributes. The package is a maintained fork of the original pykube project, which was archived. It supports Python 3.8 through 3.10 and depends on urllib3, pyyaml, and requests. While it provides a simpler, more Pythonic interface than direct API calls, it is no longer actively maintained—the last release was over 1155 days ago, so compatibility with recent Kubernetes versions and security updates are not guaranteed. Use it for: - Programmatically query and filter Kubernetes resources (pods, deployments, jobs) by namespace, label, or field selector. - Automate Kubernetes resource creation and deletion (e.g., spinning up deployments or cleaning up jobs) from Python scripts. - Watch Kubernetes resources for changes in real time and react to ADDED, MODIFIED, or DELETED events. - Build Python-based tools or operators that need to interact with a Kubernetes cluster without shelling out to kubectl. - Access raw Kubernetes object attributes and metadata through a Python object interface. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. pykube-ng is a Python client library for querying, creating, and managing Kubernetes API objects through a native Python interface backed by requests and kubeconfig authentication. Yes, with conditions. pykube-ng is stable and has low install friction, making it suitable for existing projects or scripts that already depend on it. However, do not adopt it for new projects: the package is abandoned (no releases in 1155+ days), so it will not receive security patches or updates for newer Kubernetes API versions. For new work, consider the actively maintained official Kubernetes Python client (kubernetes) instead. ## Install pip install pykube-ng uv add pykube-ng poetry add pykube-ng ## Installing pykube-ng Before you install: Low install friction with only three runtime dependencies (urllib3, pyyaml, requests). However, the package is marked abandoned with no releases for over 1155 days, so maintenance and security updates are not expected. License in practice: Licensed under Apache License 2.0, a permissive open-source license that allows use in commercial and private projects with minimal restrictions. Quickstart: pip install pykube-ng import pykube api = pykube.HTTPClient(pykube.KubeConfig.from_file()) pods = pykube.Pod.objects(api).filter(namespace="default") for pod in pods: print(pod.name) Requires Python 3.8 or later and a valid kubeconfig file (typically ~/.kube/config) to authenticate with a Kubernetes cluster. Verify before relying: - Whether the package works with recent Kubernetes API versions given the 1155+ day gap since last release. - Current status of the upstream repository and whether security patches are backported or planned. ## Package facts - License: Apache (permissive) - Python support: supports_current - Install friction: low - Maintenance: abandoned - Downloads: 252.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags kubernetes python client, k8s api library, kubernetes deployment management, python kubernetes objects, kubeconfig authentication, kubernetes pod query, k8s resource control, kubernetes, abandoned-upstream [View on SkillFed](https://skillfed.io/packages/pykube-ng) · [View on PyPI](https://pypi.org/project/pykube-ng/)