Skip to main content

decentriq_platform.media

Sub-modules

  • decentriq_platform.media.advertiser_computations
  • decentriq_platform.media.audience
  • decentriq_platform.media.computations
  • decentriq_platform.media.features
  • decentriq_platform.media.publisher_computations
  • decentriq_platform.media.request
  • decentriq_platform.media.version

Classes

ActivationType

ActivationType(
*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

Audience

Audience(
audience_type: str,
activation_type: decentriq_platform.media.audience.ActivationType,
is_published: bool,
reach: Optional[int] = None,
exclude_seed_audience: bool = False,
)

Audience(audience_type: str, activation_type: decentriq_platform.media.audience.ActivationType, is_published: bool, reach: Optional[int] = None, exclude_seed_audience: bool = False)

Static methods

from_activated_audience

def from_activated_audience(
audience: Dict[str, Any],
)> Self

as_dict

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

MediaDcr

MediaDcr(
dcr_id: str,
high_level: Dict[str, Any],
session: Session,
*,
client: Client,
)

Class representing a Media DCR.

Initialise a Media DCR.

Parameters:

  • dcr_id: ID of the Media DCR.
  • high_level: High level representation of the Media DCR.
  • session: A Session object which can be used for communication with the enclave.
  • client: A Client object which can be used to perform operations such as uploading data and retrieving computation results.

activate_audience

def activate_audience(
self,
audiences: List[Audience],
)

Activate the list of audiences, making it accessible to the Publisher if they are published. The Publisher will be able to download the user ids belonging to all the audiences, for which the is_published flag is set to True.

Parameters:

  • audiences: List of audiences that should be made available to the Publisher.

deprovision_data_lab

def deprovision_data_lab(
self,
)

Deprovision a DataLab from the Media DCR.

get_audience_user_list

def get_audience_user_list(
self,
activated_audience: Audience,
)> List[str]

Get the audience user list.

get_audience_user_list_for_advertiser

def get_audience_user_list_for_advertiser(
self,
activated_audience: Audience,
)> List[str]

Get the list of user ids for the given audience. This method is to be called by the advertiser and is different from get_audience_user_list in that it can be used to download user ids for audiences that have not been made available to the publisher. The Media DCR must have been created with the enable_advertiser_audience_download set to true, in order for this feature to work.

get_audiences_for_advertiser

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

Get the audiences for the advertiser.

get_audiences_for_publisher

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

Get the audiences for the publisher.

get_available_audiences

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

Get the available audiences for the advertiser.

get_insights

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

Get the insights.

get_overlap_statistics

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

Get the overlap statistics.

participants

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

Retrieve the participants of the Media DCR. This returns a dictionary of roles (keys) mapped to participants (email addresses).

provision_from_data_lab

def provision_from_data_lab(
self,
data_lab_id: str,
)

Provision the DataLab with the given ID to the Media DCR.

Parameters:

  • data_lab_id: ID of the DataLab to provision to the Media DCR.

retrieve_audit_log

def retrieve_audit_log(
self,
)> str

Retrieve the audit log.

stop

def stop(
self,
)

Stop the Media DCR.

MediaDcrBuilder

MediaDcrBuilder(
*,
client: Client,
enclave_specs: Optional[Dict[str, EnclaveSpecification]] = None,
)

A helper class to build a Media DCR.

Initialise a Media DCR builder.

Parameters:

  • client: A Client object that can be used to retrieve information about the platform.
  • enclave_specs: Determines the types of enclaves that will supported by this Data Clean Room. If not specified, the latest enclave specifications known to this SDK version will be used.

build

def build(
self,
)> decentriq_platform.media.media.MediaDcrDefinition

Build the Data Clean Room.

In order to use the DCR, the output of this method should be passed to client.publish_media_dcr.

with_advertiser_audience_download

def with_advertiser_audience_download(
self,
)> Self

Allow the advertiser to download the user ids for an audience.

with_advertiser_emails

def with_advertiser_emails(
self,
main: str,
additional: Optional[List[str]] = None,
)> Self

Set the advertiser email addresses.

Parameters:

  • main: The main advertiser email address.
  • additional: Optional list of additional advertiser email addresses.

with_agency_emails

def with_agency_emails(
self,
emails: List[str],
)> Self

Set the agency email addresses.

Parameters:

  • emails: List of agency email addresses.

with_data_partner_emails

def with_data_partner_emails(
self,
emails: List[str],
)> Self

Set the data partner email addresses.

Parameters:

  • emails: List of data partner email addresses.

with_exclusion_targeting

def with_exclusion_targeting(
self,
)> Self

Enable the "exclusion targeting" feature set.

with_hide_absolute_values_from_insights

def with_hide_absolute_values_from_insights(
self,
)> Self

Ensure absolute values are not included in the output of the insights computation.

with_insights

def with_insights(
self,
)> Self

Enable the "insights" feature set.

with_lookalike

def with_lookalike(
self,
)> Self

Enable the "lookalike" feature set.

with_matching_id_format

def with_matching_id_format(
self,
matching_id: MatchingId,
)> Self

Set the matching ID format.

Parameters:

  • matching_id: The type of matching ID to use.

with_name

def with_name(
self,
name: str,
)> Self

Set the name of the Data Clean Room.

Parameters:

  • name: Name to be used for the Data Clean Room.

with_observer_emails

def with_observer_emails(
self,
emails: List[str],
)> Self

Set the observer email addresses.

Parameters:

  • emails: List of observer email addresses.

with_publisher_emails

def with_publisher_emails(
self,
main: str,
additional: Optional[List[str]] = None,
)> Self

Set the publisher email addresses.

Parameters:

  • main: The main publisher email address.
  • additional: Optional list of additional publisher email addresses.

with_retargeting

def with_retargeting(
self,
)> Self

Enable the "retargeting" feature set.

MediaDcrDefinition

MediaDcrDefinition(
name: str,
high_level: Dict[str, Any],
enclave_specs: Optional[Dict[str, EnclaveSpecification]] = None,
)

Class representing a Media DCR Definition.