OptimizelyConfig
- class optimizely.optimizely_config.OptimizelyConfigService(project_config: optimizely.project_config.ProjectConfig)
Class encapsulating methods to be used in creating instance of OptimizelyConfig.
- get_config() Optional[optimizely.optimizely_config.OptimizelyConfig]
Gets instance of OptimizelyConfig
- Returns
Optimizely Config instance or None if OptimizelyConfigService is invalid.
- lookup_name_from_id(audience_id: str, audiences_map: dict[str, str]) str
Gets and audience ID and audiences map
- Returns
The name corresponding to the ID or ‘’ if not found.
- replace_ids_with_names(conditions: str | list[Any], audiences_map: dict[str, str]) str
Gets conditions and audiences_map [id:name]
- Returns
a string of conditions with id’s swapped with names or empty string if no conditions found.
- stringify_conditions(conditions: str | list[Any], audiences_map: dict[str, str]) str
Gets a list of conditions from an entities.Experiment and an audiences_map [id:name]
- Returns
A string of conditions and names for the provided list of conditions.