Skip to content

isabella232/python-client

 
 

Repository files navigation

LaunchDarkly SDK for Python

Circle CI

Quick setup

  1. Install the Python SDK with pip

     pip install ldclient-py
    
  2. Create a new LDClient with your API key:

     client = LDClient("your_api_key")
    

Your first feature flag

  1. Create a new feature flag on your dashboard

  2. In your application code, use the feature's key to check wthether the flag is on for each user:

     if client.toggle("your.flag.key", {"key": "user@test.com"}, False):
         # application code to show the feature
     else:
         # the code to run if the feature is off
    

Development information (for developing this module itself)

  1. Install requirements (run-time & test):

     pip install -r requirements.txt
     pip install -r test-requirements.txt
     pip install -r twisted-requirements.txt
    
  2. Run tests:

     $ py.test testing
    

Learn more

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.

Contributing

We encourage pull-requests and other contributions from the community. We've also published an SDK contributor's guide that provides a detailed explanation of how our SDKs work.

About LaunchDarkly

About

LaunchDarkly SDK for Python

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 97.8%
  • Ruby 1.5%
  • Shell 0.7%