bayesline.api.FeaturesApi#

class bayesline.api.FeaturesApi#

Abstract base class for feature flag API operations.

__init__()#

Methods

__init__()

check_feature_accessible(user_id, feature_name)

Check if a user has access to a specific feature.

get_feature_status(user_id, feature_names)

Get the accessibility status of a set of features for a specific user.

list_all_feature_names()

Get the list of all feature names.

abstract check_feature_accessible(user_id: str, feature_name: str) bool#

Check if a user has access to a specific feature.

Parameters#

user_idUserRef

The user, given as a user id or email.

feature_namestr

The name of the feature to check.

Returns#

bool

True if the user has access to the feature, False otherwise.

abstract get_feature_status(user_id: str, feature_names: Sequence[str]) dict[str, bool]#

Get the accessibility status of a set of features for a specific user.

Parameters#

user_idUserRef

The user, given as a user id or email.

feature_namesSequence[str]

The names of the features to check.

Returns#

dict[str, bool]

A dictionary mapping each requested feature name to its accessibility status for the user.

abstract list_all_feature_names() Sequence[str]#

Get the list of all feature names.

Returns#

Sequence[str]

List of all feature names.