SDKs
Python

Python

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

Retrieve the status of a given flag by its key.

sdk.evaluate("theFlagKey")

loadFlags

Makes an HTTP request to the Progressively server to retrieve the status of the flags.

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)