Skip to content


This section contains reference documentation for the GetCohorts python package. For a reference of the web API, you can view the documentation site at

To get started, you'll need to install the package from PyPI.

pip install getcohorts


getcohorts.core.get_seed(identifier, experiment)

Convert any combination of identifier and experiment to a random integer.

Calling this function with the same identifier and experiment value will return the same integer every time.

getcohorts.core.get_cohort(identifier, experiment, cohorts=['experimental', 'control'])

Randomly assign a value from the cohort list to the given experiment and identifier.

Calling this function with the same identifier, experiment, and list of cohorts will return the same selection from the cohort list every time.