mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
chore: finalize python sdk example (#8186)
Fix Python example and add isEnabled example.
This commit is contained in:
parent
205b59ddee
commit
95969456f6
@ -99,11 +99,13 @@ var settings = new UnleashSettings()
|
||||
|
||||
Unleash unleash = new DefaultUnleash(config);`,
|
||||
Python: `from UnleashClient import UnleashClient
|
||||
import asyncio
|
||||
|
||||
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';
|
||||
@ -217,7 +219,9 @@ export const checkFlagCodeSnippets: Record<SdkName, string> = {
|
||||
Rust: ``,
|
||||
'.NET': ``,
|
||||
Java: ``,
|
||||
Python: ``,
|
||||
Python: `while True:
|
||||
print(client.is_enabled("<YOUR_FLAG>"))
|
||||
asyncio.run(asyncio.sleep(1))`,
|
||||
JavaScript: ``,
|
||||
React: ``,
|
||||
Vue: ``,
|
||||
|
Loading…
Reference in New Issue
Block a user