| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Install the Python SDK with pip
pip install ldclient-py
Configure the library with your sdk key:
import ldclient
Get the client:
ldclient.set_sdk_key("your sdk key")
client = ldclient.get()
Create a new feature flag on your dashboard
In your application code, use the feature's key to check whether the flag is on for each user:
if client.variation("your.flag.key", {"key": "user@test.com"}, False):
# application code to show the feature
else:
# the code to run if the feature is off
Python 2.6 requires an extra dependency. Here's how to set it up:
Check out our documentation for in-depth instructions on configuring and using LaunchDarkly. You can also head straight to the complete reference guide for this SDK.
We run integration tests for all our SDKs using a centralized test harness. This approach gives us the ability to test for consistency across SDKs, as well as test networking behavior in a long-running application. These tests cover each method in the SDK, and verify that event sending, flag evaluation, stream reconnection, and other aspects of the SDK all behave correctly.
The Code Climate coverage does not include the coverage provided by this integration test harness.
See CONTRIBUTING for more information.
| Back | FazBrowse Home | New Git URL |