Skip to content

launchdarkly/hello-python

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

LaunchDarkly sample Python application

We've built a console application that demonstrates how LaunchDarkly's SDK works.

Below, you'll find the basic build procedure. For more comprehensive instructions, you can visit your Quickstart page or the Python SDK reference guide.

This demo requires Python version 3.7 or higher.

Build instructions

  1. Install the LaunchDarkly Python SDK by running pip install -r requirements.txt

  2. Edit test.py and set the value of sdk_key to your LaunchDarkly SDK key. If there is an existing boolean feature flag in your LaunchDarkly project that you want to evaluate, set feature_flag_key to the flag key.

sdk_key = "1234567890abcdef"

feature_flag_key = "my-flag"
  1. Run python test.py.

You should receive the message "Feature flag '<flag key>' is <true/false> for this user".