--- id: openshift-client version: "2.0.5" license: Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for… (full text in the JSON record) license_treatment: permissive maintenance: dormant --- # openshift-client — OpenShift python client License: permissive · Maintenance: dormant · Downloads: 184.1K/mo ## What it is and what it does openshift-client is a Python wrapper around the OpenShift oc command-line tool that lets you programmatically query and manage cluster resources. Instead of making direct REST API calls, it invokes oc commands and parses their output, making it accessible to anyone familiar with the CLI. The library centers on selectors—a concept for querying collections of resources by kind, name, or label—and APIObject instances that represent individual resources and expose convenience methods for common operations like reading logs or modifying metadata. The package is designed for automation scripts and tools that need to interact with OpenShift clusters without adding external dependencies to the cluster itself. It trades some capabilities (like watch functionality or fine-grained error codes) for simplicity and portability. If your use case fits within CLI-level interactions—querying resources, applying changes, gathering logs—this library provides a readable, fluent API. If you need controller-like behavior or precise HTTP error handling, the documentation suggests looking elsewhere. Use it for: - Automate pod log collection and analysis across multiple projects in a cluster. - Write deployment or scaling scripts that query and modify OpenShift resources by selector. - Build monitoring or reporting tools that gather resource metadata and status from a running cluster. - Manage custom resources (CRDs) without needing to generate or maintain Python bindings. - Run cluster administration tasks from a bastion host via SSH without installing additional cluster software. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides a Python API for interacting with OpenShift clusters by wrapping the oc command-line tool, enabling programmatic resource selection, querying, and management without requiring direct REST API calls. Yes, if you need to automate OpenShift cluster operations from Python and already have oc installed and configured. The low install friction, permissive license, and stable API make it a practical choice for scripting and one-off automation. No, if you need watch functionality, precise HTTP error codes, or expect active maintenance—the package is dormant and explicitly not designed for controller-like workloads. ## Install pip install openshift-client uv add openshift-client poetry add openshift-client ## Installing openshift-client Before you install: Low install friction with three lightweight runtime dependencies (build, six, pyyaml). Maintenance is dormant—last release was 617 days ago, though the repository remains active with a recent commit on 2025-01-09 and 86 stars. Suitable for stable use cases but expect no rapid updates. License in practice: Licensed under Apache License 2.0 (permissive). You may use, modify, and distribute the package freely in commercial and private projects, provided you include a copy of the license and note any changes you make. Quickstart: pip install openshift-client import openshift_client as oc with oc.project('my-project'): pods = oc.selector('pods').qnames() print(f'Found pods: {pods}') Requires the oc command-line tool to be installed and accessible in your system PATH, and a configured connection to an OpenShift cluster (typically via prior `oc login`). Verify before relying: - Whether the package supports watch functionality or only one-shot CLI invocations as documented. - Performance characteristics when selecting or operating on large numbers of resources. - Compatibility with OpenShift versions released after the last package update in December 2024. ## Package facts - License: Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for… (full text in the JSON record) (permissive) - Python support: supports_current - Install friction: low - Maintenance: dormant - Downloads: 184.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags openshift cluster management python, oc command wrapper python, openshift resource automation, kubernetes openshift cli client, openshift pod deployment scripting, openshift, kubernetes-adjacent, cli-wrapper [View on SkillFed](https://skillfed.io/packages/openshift-client) · [View on PyPI](https://pypi.org/project/openshift-client/)