Python

The Python SDK to interact with Progressively

Installation

$ pip install sdk-progressively

Usage

Create an SDK instance

from sdk.progressively import Progressively

sdk = Progressively.create("YOUR_ENVIRONMENT_KEY", "http://localhost:4000")

The SDK can receive an additional fields option.

fields is an option that allows passing data about your users to restrain the audience eligibility. For instance, you can set an email field, and in Progressively's dashboard, you can create a rule that only targets people that matches that field:

fields = {"email": "john.doe@email.com", "id": 1}
sdk = Progressively.create("YOUR_ENVIRONMENT_KEY", "http://localhost:4000", fields)

evaluate

sdk.evaluate("theFlagKey")

loadFlags

sdk.loadFlags()

fields

Fields is an option that allows to pass data about your users to create targeting strategies. For instance, you can set an email field, and in Progressively's dashboard, you can create a rule that only targets people that use an expected domain:

fields = {"email": "john.doe@email.com", "id": 1}
sdk = Progressively.create("YOUR_ENVIRONMENT_KEY", "http://localhost:4000", fields)

Last updated