Skip to content

Commit

Permalink
chore: finalize python sdk example
Browse files Browse the repository at this point in the history
  • Loading branch information
sjaanus committed Sep 19, 2024
1 parent 77b90db commit 28a61e3
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions frontend/src/component/onboarding/sdkSnippets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,13 @@ var settings = new UnleashSettings()
Unleash unleash = new DefaultUnleash(config);`,
Python: `from UnleashClient import UnleashClient
import time
client = UnleashClient(
url="<YOUR_API_URL>",
app_name="unleash-onboarding-python",
custom_headers={'Authorization': '<YOUR_API_TOKEN>"'})
refresh_interval=5,
custom_headers={'Authorization': '<YOUR_API_TOKEN>'})
client.initialize_client()`,
JavaScript: `import { UnleashClient } from 'unleash-proxy-client';
Expand Down Expand Up @@ -217,7 +219,12 @@ export const checkFlagCodeSnippets: Record<SdkName, string> = {
Rust: ``,
'.NET': ``,
Java: ``,
Python: ``,
Python: `try:
while True:
print(client.is_enabled("dEE"))
time.sleep(1)
except KeyboardInterrupt:
client.destroy()`,
JavaScript: ``,
React: ``,
Vue: ``,
Expand Down

0 comments on commit 28a61e3

Please sign in to comment.