Skip to main content

decentriq_platform.media.audiences

Classes

Audiences

Audiences(
audiences: List[Union[decentriq_platform.media.api.SeedAudience, decentriq_platform.media.api.CustomAudience]],
)

Class for managing and accessing different types of audiences.

Initialize an Audiences instance.

Parameters:

  • audiences: List of audience objects to manage

get_custom_audience

def get_custom_audience(
self,
name: str,
)> decentriq_platform.media.api.CustomAudience

Get a custom audience by name.

Parameters:

  • name: Name of the custom audience to retrieve

Returns:

  • Custom audience with the given name

Raises:

  • Exception: If no custom audience is found or multiple custom audiences found with the given name

get_seed_audience

def get_seed_audience(
self,
audience_type: str,
)> decentriq_platform.media.api.SeedAudience

Get a seed audience by type.

Parameters:

  • audience_type: Type of the seed audience to retrieve

Returns:

  • Seed audience with the given type

Raises:

  • Exception: If no seed audience is found with the given type or multiple seed audiences found with the given type

is_lookalike_audience

def is_lookalike_audience(
audience: Union[decentriq_platform.media.api.SeedAudience, decentriq_platform.media.api.CustomAudience],
)> bool

Check if an audience is a lookalike audience.

Parameters:

  • audience: The audience to check

Returns:

  • True if the audience is a lookalike audience, False otherwise

Raises:

  • Exception: If the audience type is not supported

list

def list(
self,
)> List[Union[decentriq_platform.media.api.SeedAudience, decentriq_platform.media.api.CustomAudience]]

List all audiences.

Returns:

  • List of all audiences