Skip to content

Commit 7ad62a7

Browse files
committed
docs: adding README data
chore: release 0.1.3 Release-As: 0.1.3
1 parent 9aeecbf commit 7ad62a7

3 files changed

Lines changed: 53 additions & 7 deletions

File tree

.github/workflows/release-please.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@ on:
33
branches:
44
- main
55

6-
permissions:
7-
contents: write
8-
pull-requests: write
9-
id-token: write
106
name: release-please
117

128
jobs:
139
release-please:
10+
permissions:
11+
contents: write
12+
pull-requests: write
13+
id-token: write
14+
1415
runs-on: ubuntu-20.04
1516
environment:
1617
name: pypi
17-
url: https://test.pypi.org/project/cloudbees-openfeature-provider-python
1818
steps:
1919
- uses: google-github-actions/release-please-action@v4
2020
id: release

README.md

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,48 @@
1-
# CloudBees Feature Management provider for OpenFeature
1+
# CloudBees Feature Management provider for OpenFeature
2+
3+
[![Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip)
4+
[![a](https://img.shields.io/badge/slack-%40cncf%2Fopenfeature-brightgreen?style=flat&logo=slack)](https://cloud-native.slack.com/archives/C0344AANLA1)
5+
[![OpenFeature Specification](https://img.shields.io/static/v1?label=OpenFeature%20Specification&message=v0.3.0&color=red)](https://github.com/open-feature/spec/tree/v0.3.0)
6+
[![OpenFeature SDK](https://img.shields.io/static/v1?label=OpenFeature%20SDK&message=v1.0.0&color=green)](https://github.com/open-feature/python-sdk/)
7+
[![CloudBees Rox SDK](https://img.shields.io/static/v1?label=Rox%20SDK&message=v5.0.10&color=green)](https://pypi.org/project/rox/)
8+
9+
This is the [CloudBees](https://www.cloudbees.com/products/feature-management) provider implementation for [OpenFeature](https://openfeature.dev/) for the [Python SDK](https://github.com/open-feature/python-sdk).
10+
11+
OpenFeature provides a vendor-agnostic abstraction layer on Feature Flag management.
12+
13+
This provider allows the use of CloudBees Feature Management as a backend for Feature Flag configurations.
14+
15+
## Requirements
16+
- python 3.8 or higher
17+
18+
## Installation
19+
20+
### Add it to your build
21+
22+
```bash
23+
pip install cloudbees-openfeature-provider-python
24+
```
25+
26+
### Confirm peer dependencies are installed
27+
```bash
28+
pip install openfeature-sdk
29+
```
30+
31+
32+
### Configuration
33+
34+
Follow the instructions on the [Python SDK project](https://github.com/open-feature/python-sdk) for how to use the Python SDK.
35+
36+
You can configure the CloudBees provider by doing the following:
37+
38+
```python
39+
from openfeature import api
40+
from openfeature.api import EvaluationContext
41+
from cloudbees.provider import CloudbeesProvider
42+
43+
appKey = 'INSERT_APP_KEY_HERE'
44+
provider = CloudbeesProvider(appKey)
45+
api.set_provider(provider)
46+
client = api.get_client()
47+
value = client.get_boolean_value("enabled-new-feature", False)
48+
```

cloudbees/provider.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
class CloudbeesProvider(AbstractProvider):
1212
def __init__(self, api_key="", rox_options=None):
13-
print('setup')
1413
if api_key == "":
1514
raise Exception("Must provide apiKey")
1615

0 commit comments

Comments
 (0)