Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,13 @@ and get familiar with the concepts.
#### pip install
<!---x-release-please-start-version-->
```python
pip install confidence-openfeature-provider==0.2.0
```
pip install spotify-confidence-sdk==0.2.1

#### requirements.txt
```python
confidence-openfeature-provider==0.2.0
spotify-confidence-sdk==0.2.1

pip install requirements.txt
pip install -r requirements.txt
```
<!---x-release-please-end-->

Expand All @@ -41,7 +40,7 @@ The flag's schema is validated against the requested data type, and if it doesn'
```python

from confidence.confidence import Region
from confidence.provider import ConfidenceOpenFeatureProvider
from confidence.openfeature_provider import ConfidenceOpenFeatureProvider
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⭐️

from openfeature.api import EvaluationContext
from openfeature import api

Expand Down
2 changes: 1 addition & 1 deletion catalog-info.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: confidence-openfeature-provider-python
name: confidence-sdk-python
spec:
type: library
owner: hawkeye
File renamed without changes.
2 changes: 1 addition & 1 deletion demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ async def get_flag():
uuid_string = str(random_uuid)
confidence = root.with_context({"targeting_key": uuid_string})
await confidence.with_context({"app": "python"}).track_async("navigate", {})

value = confidence.resolve_string_details("hawkflag.color", "False")
print(f"Flag value: {value}")

Expand Down
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@ build-backend = "setuptools.build_meta"
write_to = "confidence/_version.py"
local_scheme = "no-local-version"

[tool.setuptools]
packages = {find = {exclude = ["demo"]}}

[project]
name = "confidence_openfeature_provider"
name = "spotify_confidence_sdk"
dynamic = ["version"]
description = "Confidence provider for the OpenFeature SDK"
readme = "README.md"
Expand Down
6 changes: 3 additions & 3 deletions tests/test_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

import confidence.confidence
from confidence.confidence import Confidence
from confidence.provider.provider import ConfidenceOpenFeatureProvider
from confidence.provider.provider import EvaluationContext
from confidence.provider.provider import Region
from confidence.openfeature_provider import ConfidenceOpenFeatureProvider
from confidence.openfeature_provider import EvaluationContext
from confidence.openfeature_provider import Region


class TestMyProvider(unittest.TestCase):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_provider_parametrized.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from openfeature.evaluation_context import EvaluationContext

from confidence.confidence import Confidence
from confidence.provider.provider import ConfidenceOpenFeatureProvider
from confidence.openfeature_provider import ConfidenceOpenFeatureProvider
from tests.test_provider import SUCCESSFUL_FLAG_RESOLVE


Expand Down