Skip to content

Commit 45e9aa3

Browse files
authored
feat: Update to provider 0.2.0 (#4)
1 parent a7e4c1a commit 45e9aa3

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- name: Install dependencies
3131
run: poetry install
3232

33-
- uses: launchdarkly/gh-actions/actions/verify-hello-app@verify-hello-app-v1.0.0
33+
- uses: launchdarkly/gh-actions/actions/verify-hello-app@verify-hello-app-v2.0.0
3434
with:
3535
use_server_key: true
3636
role_arn: ${{ vars.AWS_ROLE_ARN }}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ We've built a simple console script that demonstrates how LaunchDarkly's OpenFea
77
## Build instructions
88

99
1. Install the project dependencies by running `poetry install`
10-
2. Set the environment variable `LAUNCHDARKLY_SERVER_KEY` to your LaunchDarkly SDK key.
10+
2. Set the environment variable `LAUNCHDARKLY_SDK_KEY` to your LaunchDarkly SDK key.
1111
3. Set the environment variable `LAUNCHDARKLY_FLAG_KEY` to the LaunchDarkly boolean flag key you wish to evaluate.
1212
4. Run `poetry run python main.py`.
1313

14-
You should see the message `"Feature flag '<flag key>' is <True/False> for this context"`.
14+
You should see the message `"The <flag key> feature flag evaluates to <true/false>"`.

main.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
from ld_openfeature import LaunchDarklyProvider
55
from os import getenv
66

7-
sdk_key = getenv("LAUNCHDARKLY_SERVER_KEY", "")
7+
sdk_key = getenv("LAUNCHDARKLY_SDK_KEY", "")
88
flag_key = getenv("LAUNCHDARKLY_FLAG_KEY", "")
99

1010
if sdk_key == "":
11-
print("*** Set the 'LAUNCHDARKLY_SERVER_KEY' environment variable before running this script")
11+
print("*** Set the 'LAUNCHDARKLY_SDK_KEY' environment variable before running this script")
1212
exit(1)
1313
elif flag_key == "":
1414
print("*** Set the 'LAUNCHDARKLY_FLAG_KEY' environment variable before running this script")
@@ -24,4 +24,4 @@
2424
context = EvaluationContext("example-user-key", {"name": "Sandy"})
2525

2626
flag_value = client.get_boolean_value(flag_key, False, context)
27-
print(f"*** Feature flag '{flag_key}' is {flag_value} for this context")
27+
print(f"*** The {flag_key} feature flag evaluates to {flag_value}.")

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ readme = "README.md"
77

88
[tool.poetry.dependencies]
99
python = "^3.8"
10-
launchdarkly-openfeature-server = "^0.1.0"
10+
launchdarkly-openfeature-server = "^0.2.0"
1111

1212

1313
[build-system]

0 commit comments

Comments
 (0)