Skip to content

Latest commit

 

History

History
42 lines (31 loc) · 808 Bytes

index.md

File metadata and controls

42 lines (31 loc) · 808 Bytes

unleash-client-python

Welcome to the Unleash Python client documentation! This folder contains documentation related to the project.

Installation

Check out the package on Pypi!

pip install UnleashClient

Initialization

from UnleashClient import UnleashClient
client = UnleashClient("https://unleash.herokuapp.com/api", "My Program")
client.initialize_client()

To clean up gracefully:

client.destroy()

Checking if a feature is enabled

A check of a simple toggle:

client.is_enabled("My Toggle")

Specifying a default value:

client.is_enabled("My Toggle", default_value=True)

Supplying application context:

app_context = {"userId": "test@email.com"}
client.is_enabled("User ID Toggle", app_context)