openshift
OpenShift python client
What it is and what it does
The openshift package is a Python client for the Kubernetes and OpenShift REST APIs. It wraps the kubernetes client and provides a dynamic resource model that lets you interact with any Kubernetes or OpenShift resource—built-in types like Services and Routes, as well as custom resources defined via Custom Resource Definitions—without needing resource-specific generated code. The library depends on kubernetes, python-string-utils, and six.
You instantiate a DynamicClient from a Kubernetes API client, then call `resources.get()` to retrieve a resource type by API version and kind, and use standard methods like `get()`, `create()`, `delete()`, `patch()`, `replace()`, and `watch()` to interact with instances. The package includes helper utilities for authentication, such as username/password login to OpenShift clusters. Because the project is abandoned and has not been updated since 2023-07-25, compatibility with recent Kubernetes or OpenShift releases is uncertain.
Use it for:
- Automate OpenShift cluster operations—create, list, and delete projects, services, and routes programmatically
- Manage custom resources and Custom Resource Definitions in Kubernetes clusters without writing resource-specific client code
- Build Python-based deployment or orchestration tools that work with multiple Kubernetes API versions and custom resource types
- Authenticate to OpenShift clusters using username and password credentials and retrieve API tokens
- Write integration tests or monitoring scripts that query and manipulate Kubernetes resources generically
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Python client library for interacting with Kubernetes and OpenShift APIs using a dynamic resource model that works with built-in and custom resources.
Yes, but with caution. The package is suitable for existing OpenShift/Kubernetes Python automation projects and provides a clean dynamic API that avoids code generation. However, the project is abandoned—no updates since 2023-07-25—so verify compatibility with your target Kubernetes and OpenShift versions before adopting it in new projects. For actively maintained alternatives, check the kubernetes client directly or newer OpenShift-specific libraries.
Install
openshift on PyPI
pip
pip install openshiftuv
uv add openshiftpoetry
poetry add openshiftInstalling openshift
Before you install
Low install friction with three runtime dependencies. However, maintenance status is abandoned—the last release was 2023-07-25, and the repository shows no recent activity despite being unarchived. New projects should verify compatibility with current Kubernetes and OpenShift versions.
License in practice
Licensed under Apache License Version 2.0, a permissive open-source license. You may use, modify, and distribute this package freely in commercial and private projects, provided you include a copy of the license and state significant changes.
Quickstart
pip install openshift
from kubernetes import client, config
from openshift.dynamic import DynamicClient
k8s_client = config.new_client_from_config()
dyn_client = DynamicClient(k8s_client)
v1_services = dyn_client.resources.get(api_version='v1', kind='Service')
service_list = v1_services.get(namespace='default')
Requires a valid Kubernetes configuration file (typically ~/.kube/config) or explicit cluster credentials to authenticate and connect to a Kubernetes or OpenShift cluster.
Verify before relying
- Compatibility with current Kubernetes and OpenShift API versions beyond 2023-07-25
- Whether the dynamic client approach fully replaces the deprecated swagger-generated models
- Support status for Python versions beyond 3.5 given the Alpha development status classifier
Package facts
| License | Apache License Version 2.0 (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — kubernetes, python-string-utils, six |
| Maintenance | abandoned — 1,116 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 528,536/month — #6,165 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: openshift-0.13.2-py3-none-any.whl
Keywords: Swagger, OpenAPI, Kubernetes, OpenShift
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
kr8sA Python client library for Kubernetes that…
permissive · top 5,000 on PyPI
openshift-clientProvides a Python API for interacting with…
permissive · top 15,000 on PyPI
redfishA Python library for interacting with…
permissive · top 15,000 on PyPI
kubernetes-asyncioAsynchronous Python client for the Kubernetes…
permissive · top 5,000 on PyPI
kubernetes-typedA mypy plugin that adds type checking support…
permissive · top 15,000 on PyPI
k8s-agent-sandboxA Python client library for creating and…
permissive · top 15,000 on PyPI
pykube-ngpykube-ng is a Python client library for…
permissive · top 15,000 on PyPI
pulumi-kubernetesPulumi Kubernetes Resource Provider lets you…
permissive · top 5,000 on PyPI
azure-mgmt-redhatopenshiftProvides Python bindings to manage Red Hat…
permissive · top 5,000 on PyPI
assisted-service-clientA Python client library for the OpenShift…
permissive · top 15,000 on PyPI