Api reference
components.feature_flags_context.public.api ¶
DataAccessors ¶
Bases: TypedDict
Type definition for data accessor functions.
All keys are optional to allow partial provision of accessors.
member_account_ids
instance-attribute
¶
Function that takes company IDs and returns a list of unique account IDs
get_feature_flags_context_for_user ¶
Get LaunchDarkly context data for a user.
This function extracts relevant information for feature flagging purposes using country-agnostic components to avoid dependencies between be/fr/es/ca.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
user
|
BaseUser
|
The user object (can be from any country) |
required |
data_accessors
|
Optional[DataAccessors]
|
Optional typed dictionary of accessor functions. See DataAccessors type for supported keys and signatures. Currently supported: - "member_account_ids": Function(company_ids: Iterable[str]) -> list[str] |
None
|
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
A dictionary containing LaunchDarkly context data with: |
dict[str, Any]
|
|
dict[str, Any]
|
|
dict[str, Any]
|
|
dict[str, Any]
|
|