Skip to content

Commit

Permalink
Enhnace the readme (#1917)
Browse files Browse the repository at this point in the history
* add examples

* add examples

* add examples

* add examples
  • Loading branch information
rnetser authored Jul 21, 2024
1 parent 9ddc2cb commit 675fd27
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,29 @@
# openshift-python-wrapper
# openshift-python-wrapper (`wrapper`)
Pypi: [openshift-python-wrapper](https://pypi.org/project/openshift-python-wrapper)
A python wrapper for [kubernetes-python-client](https://github.com/kubernetes-client/python) with support for RedHat Container Virtualization. ([Openshift Virtualization](https://www.openshift.com/learn/topics/virtualization))
A python wrapper for [kubernetes-python-client](https://github.com/kubernetes-client/python) with support for [RedHat Container Virtualization](https://www.openshift.com/learn/topics/virtualization)
Docs: [openshift-python-wrapper docs](https://openshift-python-wrapper.readthedocs.io/en/latest/)

The wrapper offers a simple and intuitive interface for interacting with the API.
It standardizes how to work with cluster resources and offers unified resource CRUD (Create, Read, Update, and Delete) flows.
The wrapper also provides additional capabilities, such as resource-specific functionality that otherwise needs to be implemented by users.
The wrapper makes code easier to read and maintain over time.

One example of simplified usage is interacting with a container.
Running a command inside a container requires using Kubernetes stream, handling errors, and more.
The wrapper handles it all and provides simple and intuitive functionality.

![Alt Text](examples/pod_example.gif)

Both developers or testers can use the wrapper. The code is modular and easy to maintain.
Instead of writing custom code for every API, you can use the wrapper that provides a consistent interface for interacting with APIs.
It saves time, avoids code duplications, and reduces the chance of errors.

Using Python capabilities, context managers can provide out-of-the-box resource creation and deletion,
and inheritance can be used to extend functionality for specific use cases.
Pytest fixtures can utilize the code for setup and teardown, leaving no leftovers.
Resources can even be saved for debugging.
Resource manifests and logs can be easily collected.

## Installation
From source:
```bash
Expand Down Expand Up @@ -55,7 +76,7 @@ We use pre-commit for code check.
pre-commit install
```

Some code examples locate at `examples` directory
Some code examples locate at [examples](examples) directory

## Contribute to the project
To contribute new additions or changes to the project, please refer to the [contribution guide](CONTRIBUTING.md) first.
Binary file added examples/pod_example.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 675fd27

Please sign in to comment.