Skip to main content

Retrieve attributes in your application

Calculated attribute values are stored in the Profiles Store and consumed by your applications via the Python SDK, Node.js SDK, or API.

Start by connecting to Signals to create a Signals client object.

Use a service​

The preferred way to retrieve attributes is via a service, which lets you fetch attributes from multiple groups in one call. See Services to define one using the Console or Python SDK.

Use get_service_attributes() to retrieve attributes from a service.

python
calculated_values = sp_signals.get_service_attributes(
name="my_service",
attribute_key="domain_userid",
identifier="218e8926-3858-431d-b2ed-66da03a1cbe5",
)
ArgumentDescriptionTypeRequired?
nameThe name of the servicestring✅
attribute_keyThe attribute key to retrieve attributes forstring✅
identifierThe specific attribute key valuestring✅

Retrieve individual attributes​

You can also retrieve attributes directly from a specific attribute group, without a service. This is useful when you want a small subset of attributes or haven't defined a service yet.

Use get_group_attributes() to retrieve specific attributes.

python
calculated_values = sp_signals.get_group_attributes(
name="my_attribute_group",
version=1,
attributes=["page_view_count"],
attribute_key="domain_userid",
identifier="218e8926-3858-431d-b2ed-66da03a1cbe5",
)
ArgumentDescriptionTypeRequired?
nameThe name of the attribute groupstring✅
versionThe attribute group versionint✅
attributesThe names of the attributes to retrievestring or list of string✅
attribute_keyThe attribute key namestring✅
identifierThe specific attribute key valuestring✅

On this page

Want to see a custom demo?

Our technical experts are here to help.