Skip to main content

decentriq_platform.ab_media.rule_based_builder

Classes

AudienceCombinatorBuilder

AudienceCombinatorBuilder(
*,
operator: decentriq_platform.ab_media.audience_definitions.CombineOperator,
source_audience_name: str,
audiences: List[Union[decentriq_platform.ab_media.audience_definitions.RuleBasedAudienceDefinition, decentriq_platform.ab_media.audience_definitions.LookalikeAudienceDefinition, decentriq_platform.ab_media.audience_definitions.AdvertiserAudienceDefinition]],
)

Builder for constructing an AudienceCombinator.

Initialise the audience combinator builder.

Parameters:

  • operator: The operator used to combine audiences.
  • source_audience_name: Name of the source audience to combine with.
  • audiences: Definitions of all existing audiences.

build

def build(
self,
)> decentriq_platform.ab_media.audience_definitions.AudienceCombinator

Build the audience combinator.

with_filters

def with_filters(
self,
filters: decentriq_platform.ab_media.audience_definitions.AudienceFilters,
)> typing_extensions.Self

Set the filters to be applied to the source audience.

Parameters:

  • filters: Filters to be applied to the source audience.

RuleBasedAudienceBuilder

RuleBasedAudienceBuilder(
*,
name: str,
source_audience_name: str,
audiences: List[Union[decentriq_platform.ab_media.audience_definitions.RuleBasedAudienceDefinition, decentriq_platform.ab_media.audience_definitions.LookalikeAudienceDefinition, decentriq_platform.ab_media.audience_definitions.AdvertiserAudienceDefinition]],
)

Builder for constructing rule-based audience definitions.

Initialise the rule-based audience builder.

Parameters:

  • name: Name of the rule-based audience.
  • source_audience_name: Name of the source audience that the rule-based audience will be built from.
  • audiences: Definitions of all existing audiences.

build

def build(
self,
)> decentriq_platform.ab_media.audience_definitions.RuleBasedAudienceDefinition

Build the rule-based audience definition.

with_combinator

def with_combinator(
self,
combinators: List[decentriq_platform.ab_media.audience_definitions.AudienceCombinator],
)> typing_extensions.Self

Set the combinators to be applied to the audiences. This defines how multiple audiences can be combined.

Parameters:

  • combinators: The list of combinators used to combine audiences.

with_filters

def with_filters(
self,
filters: decentriq_platform.ab_media.audience_definitions.AudienceFilters,
)> typing_extensions.Self

Set the filters to be applied to the source audience.

Parameters:

  • filters: Filters to be applied to the source audience.

with_make_available_to_publisher

def with_make_available_to_publisher(
self,
)> typing_extensions.Self

Make the rule-based audience available to the publisher.