Skip to content

Commit 74248f5

Browse files
Update README (#325)
update README
1 parent e605ad7 commit 74248f5

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,64 @@
11
# openshift-python-utilities
2+
23
Pypi: [openshift-python-utilities](https://pypi.org/project/openshift-python-utilities/)
34
A utilities repository for [openshift-restclient-python](https://github.com/openshift/openshift-restclient-python)
45

56
## Release new version
7+
68
### requirements:
9+
710
* Export GitHub token
11+
812
```bash
913
export GITHUB_TOKEN=<your_github_token>
1014
```
15+
1116
* [release-it](https://github.com/release-it/release-it)
1217

1318
Run the following once (execute outside repository dir for example `~/`):
19+
1420
```bash
1521
sudo npm install --global release-it
1622
npm install --save-dev @release-it/bumper
1723
```
1824
### usage:
25+
1926
* Create a release, run from the relevant branch.
2027
To create a 4.11 release, run:
28+
2129
```bash
2230
git checkout v4.11
2331
git pull
2432
release-it # Follow the instructions
2533
```
34+
35+
## Installation
36+
37+
From source using [poetry](https://github.com/python-poetry/poetry).
38+
39+
```
40+
git clone https://github.com/RedHatQE/openshift-python-utilities.git
41+
cd openshift-python-utilities
42+
poetry install
43+
```
44+
45+
## Examples
46+
47+
### Get Client
48+
49+
```python
50+
from ocp_utilities.infra import get_client
51+
client = get_client(config_file=<path to kubeconfig>))
52+
```
53+
54+
### Install Operator
55+
56+
```python
57+
from ocp_utilities.operators import install_operator
58+
install_operator(
59+
admin_client=client,
60+
name=<operator name>,
61+
channel=<channel>,
62+
source=<source>,
63+
)
64+
```

0 commit comments

Comments
 (0)