openshift-client
OpenShift python client
Decision gist · record as of 2026-08-14
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.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- 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`).
- 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.
License · maintenance · safety
permissive license (permissive) — 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.
last release 2024-12-05 (617 days) · last repo commit 2025-01-09 · 86 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 184,086 downloads/mo, #10,045 on PyPI
Alternatives
Verify before relying
pip install openshift-client
import openshift_client as oc
with oc.project('my-project'):
pods = oc.selector('pods').qnames()
print(f'Found pods: {pods}')- 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.
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 on this page. Verify before relying on it.
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
openshift-client on PyPI
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.
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`).
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}')
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 | permissive license permissive |
| Python support | Supports the current Python release >=3.0 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagesbuildsixpyyaml |
| Maintenance | Dormant 617 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 184,086 / month, #10,045 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersIntended Audience :: Information TechnologyLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.12Topic :: Utilities |
Evidence: openshift_client-2.0.5-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “oc command wrapper python”
- openshift-clientProvides a Python API for interacting with OpenShift clusters by…
- subprocrunnerWraps Python's subprocess module to simplify running external…
- sargeSarge wraps Python's subprocess module to provide POSIX-style command…
Give your agent the search over MCP, or paste the wish link into any chat.
More Utilities packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.
Install it if you need to display or transform source code.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
See also openshift · kr8s · azure-mgmt-redhatopenshift · kubernetes · kubernetes-asyncio · livy · runpod · portforward · k8s-agent-sandbox · osc-placement