Skip to content

Latest commit

 

History

History
25 lines (17 loc) · 1.25 KB

File metadata and controls

25 lines (17 loc) · 1.25 KB

LaunchDarkly sample Python application

Build and run

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. On the command line, set the value of the environment variable LAUNCHDARKLY_SERVER_KEY to your LaunchDarkly SDK key.

    export LAUNCHDARKLY_SERVER_KEY="1234567890abcdef"
  3. On the command line, set the value of the environment variable LAUNCHDARKLY_FLAG_KEY to an existing boolean feature flag in your LaunchDarkly project that you want to evaluate.

    export LAUNCHDARKLY_FLAG_KEY="my-boolean-flag"
  4. Run python test.py.

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