Evaluate a feature flag for a user using the LaunchDarkly API
dark-mode
that allows anyone with example.com
email address to true
, and everyone else to false
. Ensure you have an API key from LaunchDarkly and have it stored in a .env
file.Show me the code
.env
file in the project root with your LaunchDarkly API key:
launchdarkly-feature-flag.py
with the following content:
.env
file in the same directory as the script. Then, execute the script: