2021-02-25 16:01:36 +01:00
|
|
|
|
---
|
|
|
|
|
id: python_sdk
|
|
|
|
|
title: Python SDK
|
|
|
|
|
---
|
|
|
|
|
|
2021-05-04 16:08:21 +02:00
|
|
|
|
> **Required details**
|
|
|
|
|
>
|
|
|
|
|
> - **API URL** – Where you should connect your client SDK
|
2021-05-18 11:19:33 +02:00
|
|
|
|
> - **API Secret** – [Your API secret required to connect to your instance](../user_guide/api-token).
|
2021-05-04 16:08:21 +02:00
|
|
|
|
>
|
|
|
|
|
> You can find this information in the “Admin” section Unleash management UI.
|
|
|
|
|
|
|
|
|
|
```python
|
2021-02-25 16:01:36 +01:00
|
|
|
|
from UnleashClient import UnleashClient
|
2021-05-04 16:08:21 +02:00
|
|
|
|
|
2021-02-25 16:01:36 +01:00
|
|
|
|
client = UnleashClient(
|
|
|
|
|
url="<API url>",
|
|
|
|
|
app_name="my-python-app",
|
|
|
|
|
custom_headers={'Authorization': '<Client secret>'})
|
2021-05-04 16:08:21 +02:00
|
|
|
|
|
2021-02-25 16:01:36 +01:00
|
|
|
|
client.initialize_client()
|
2021-05-04 16:08:21 +02:00
|
|
|
|
|
2021-02-25 16:01:36 +01:00
|
|
|
|
client.is_enabled("unleash.beta.variants")
|
|
|
|
|
```
|
|
|
|
|
|
2021-05-04 16:08:21 +02:00
|
|
|
|
Read more at [github.com/Unleash/unleash-client-python](https://github.com/Unleash/unleash-client-python)
|