Skip to main content

decentriq_platform.ab_media.audience_definitions

Functions

audience_id_from_name

def audience_id_from_name(
name: str,
audiences: AudienceDefinitions,
)> str

audience_name_from_id

def audience_name_from_id(
audience_id: str,
audiences: Dict[str, Any],
)> str

get_mutable_variables

def get_mutable_variables(
mutable: Dict[str, Any],
)> Tuple[str, decentriq_platform.ab_media.audience_definitions.AudienceStatus, str]

Classes

AdvertiserAudienceDefinition

AdvertiserAudienceDefinition(
*,
name: str,
audience_size: int,
audience_type: str,
status: AudienceStatus,
id: Optional[str] = None,
created_at: Optional[str] = None,
)

Static methods

from_dict

def from_dict(
d: Dict[str, Any],
audiences: Dict[str, Any],
)> Self

as_dict

def as_dict(
self,
)> Dict[str, Any]

AudienceCombinator

AudienceCombinator(
*,
operator: CombineOperator,
source_audience_name: str,
source_audience_id: str,
filters: Optional[AudienceFilters] = None,
)

Static methods

from_dict

def from_dict(
d: Dict[str, Any],
audiences: Dict[str, Any],
)> Self

as_dict

def as_dict(
self,
)> Dict[str, Any]

AudienceFilters

AudienceFilters(
*,
filters: List[Filter],
operator: MatchOperator,
)

Static methods

from_dict

def from_dict(
d: Dict[str, Any],
)> Self

as_dict

def as_dict(
self,
)> Dict[str, Any]

AudienceStatus

AudienceStatus(
*args,
**kwds,
)

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

Ancestors (in MRO)

  • builtins.str
  • enum.Enum

CombineOperator

CombineOperator(
*args,
**kwds,
)

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

Ancestors (in MRO)

  • builtins.str
  • enum.Enum

Filter

Filter(
*,
attribute: str,
values: List[str],
operator: FilterOperator,
)

Static methods

from_dict

def from_dict(
d: Dict[str, Any],
)> Self

as_dict

def as_dict(
self,
)> Dict[str, Any]

FilterOperator

FilterOperator(
*args,
**kwds,
)

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

Ancestors (in MRO)

  • builtins.str
  • enum.Enum

LookalikeAudienceDefinition

LookalikeAudienceDefinition(
*,
name: str,
reach: int,
seed_audience_name: str,
source_ref_id: str,
exclude_seed_audience: bool,
status: AudienceStatus,
id: Optional[str] = None,
created_at: Optional[str] = None,
)

Static methods

from_dict

def from_dict(
d: Dict[str, Any],
audiences: Dict[str, Any],
)> Self

as_dict

def as_dict(
self,
)> Dict[str, Any]

MatchOperator

MatchOperator(
*args,
**kwds,
)

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

Ancestors (in MRO)

  • builtins.str
  • enum.Enum

RuleBasedAudienceDefinition

RuleBasedAudienceDefinition(
*,
name: str,
source_ref_name: str,
source_ref_id: str,
status: AudienceStatus,
filters: Optional[AudienceFilters] = None,
combinators: Optional[List[AudienceCombinator]] = None,
id: Optional[str] = None,
created_at: Optional[str] = None,
audiences: Optional[AudienceDefinitions] = None,
)

Static methods

from_dict

def from_dict(
d: Dict[str, Any],
audiences: Dict[str, Any],
)> Self

as_dict

def as_dict(
self,
)> Dict[str, Any]