Profile properties

Retrieving profile property objects

class ProfilePropertyMixin

This class defines all functions related to BlueConic profile properties.

get_profile_properties(start=0, count=10000000)

Gets all profile properties and returns them in a generator with all BlueConic profile properties.

Parameters
  • start (int, optional) – The profile property to start from. Defaults to 0.

  • count (int, optional) – The number of profile properties to retrieve. Defaults to 10000000.

Returns

Iterator with ProfileProperty

Return type

Iterator[ProfileProperty]

Usage:
>>> import blueconic
>>> bc = blueconic.Client()
>>> for profile_property in bc.get_profile_properties():
>>>     print(profile_property.get_name(), profile_property.get_description())
get_profile_property(profile_property_id)

Gets the profile property with the profile property ID and returns it as a BlueConic profile property.

Parameters

profile_property_id (str) – The ID of the profile property to retrieve

Raises

HTTPError: Request fails

Returns

A profile property

Return type

ProfileProperty

Usage:
>>> import blueconic
>>> bc = blueconic.Client()
>>> bc.get_profile_property('age')
<client.domain.profileProperty.ProfileProperty>

Using profile property objects

class ProfileProperty
get_description(locale=None)

Gets the description for the given locale.

Parameters

locale (str, optional) – The locale of the linked description

Returns

The description of the linked locale

Return type

str

Usage:
>>> import blueconic
>>> bc = blueconic.Client()
>>> my_property = bc.get_profile_property("frequency")
>>> print(my_property.get_description())
>>> print(my_property.get_description('nl_NL'))
Index for the average amount of visits per day of the visitor from the first visit until today. Value is 100 for the visitors with the highest average in your universe. Value is 0 for visitors with an average of (almost) 0 visits per day from the first visit date.
Index voor het gemiddeld aantal bezoeken per dag van een bezoeker van het eerste bezoek tot en met vandaag. Waarde is 100 voor bezoekers met de hoogste gemiddelde in uw universum. Waarde is 0 voor bezoekers met een gemiddelde van (bijna) 0 bezoeken per dag.
get_name(locale=None)

Gets the name for the given locale of this profile property.

Parameters

locale (str, optional) – The locale of the name

Returns

The name of the linked locale

Return type

str

Usage:
>>> import blueconic
>>> bc = blueconic.Client()
>>> my_property = bc.get_profile_property("frequency")
>>> print(my_property.get_name())
>>> print(my_property.get_name('nl_NL'))
Behavioral: Frequency
Gedrag: frequentie
property currency

Returns the currency of this profile property; only has a value for profile properties of type CURRENCY.

property id

Returns the ID of this profile property.

property is_unique_identifier

Returns if this profile property is a unique identifier.

property permission_level

Returns the permission level of this profile property.

property precision

Returns the precision of this profile property. Has a value only for profile properties of type DECIMAL and CURRENCY.

property type

Returns the type of this profile property. BlueConic uses the following types:

Type

Description

RANGE

Returns a number (int).

SELECT

Returns a text (str).

DATETIME

Returns a date and time (datetime).

DECIMAL

Returns a float (float); has a value in the precision parameter.

CURRENCY

Returns a float (float); has a value in the precision and currency parameters.

EMAIL

Returns an email address (str).