Skip to main content

No project description provided

Project description

Snowplow Signals Python SDK

The Snowplow Signals Python SDK enables you to interact with the Snowplow Signals Profile API. It provides a simple interface to define, deploy, and retrieve user attributes for personalization.

Installation

pip install snowplow-signals

Quickstart

from snowplow_signals import Signals, SignalsSandbox, Attribute, Event, StreamAttributeGroup, domain_sessionid

# Initialize the SDK with BDP authentication (default)
signals = Signals(
    api_url="API_URL",
    api_key="API_KEY",
    api_key_id="API_KEY_ID",
    org_id="ORG_ID",
)

# Or initialize with SANDBOX authentication
signals = SignalsSandbox(
    api_url="API_URL",
    sandbox_token="YOUR_SANDBOX_TOKEN",
)

# Define an attribute
page_view_count = Attribute(
    name="page_view_count",
    type="int32",
    events=[
        Event(
            vendor="com.snowplowanalytics.snowplow",
            name="page_view",
            version="1-0-0",
        )
    ],
    aggregation="counter"
)

# Create and deploy a view
stream_attribute_group = StreamAttributeGroup(
    name="my_attribute_group",
    version=1,
    attribute_key=domain_sessionid,
    attributes=[page_view_count],
)
signals.publish([stream_attribute_group])

# Retrieve attributes
response = signals.get_group_attributes(
    name="my_attribute_group",
    version=1,
    attribute_key="domain_sessionid",
    attributes=["page_view_count"],
    identifier="abc-123",
)

Key Features

  • Define attributes based on Snowplow events
  • Create attribute groups for related attributes
  • Deploy attribute groups to the Profile API
  • Retrieve real-time user attributes

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

snowplow_signals-0.4.6rc1.tar.gz (34.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

snowplow_signals-0.4.6rc1-py3-none-any.whl (44.4 kB view details)

Uploaded Python 3

File details

Details for the file snowplow_signals-0.4.6rc1.tar.gz.

File metadata

  • Download URL: snowplow_signals-0.4.6rc1.tar.gz
  • Upload date:
  • Size: 34.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.11.15 Linux/6.17.0-1020-azure

File hashes

Hashes for snowplow_signals-0.4.6rc1.tar.gz
Algorithm Hash digest
SHA256 a846835fafb2717d688ee797cfc4d1dac5106484857396324fd75f6e9601c258
MD5 9f63adb5a31a8320bb0694cc109ffc36
BLAKE2b-256 0051073cdecb607e92b1aa2c9a996cc0c01a9461d83b73822316c1661184372b

See more details on using hashes here.

File details

Details for the file snowplow_signals-0.4.6rc1-py3-none-any.whl.

File metadata

  • Download URL: snowplow_signals-0.4.6rc1-py3-none-any.whl
  • Upload date:
  • Size: 44.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.11.15 Linux/6.17.0-1020-azure

File hashes

Hashes for snowplow_signals-0.4.6rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 4bd49b6f1931230669c09e4db6e994f9a1f2ce22e0b8c2f2c59f87e8469fefa7
MD5 76e7a7fb31be7c8b14251a56b6ea1d0b
BLAKE2b-256 7f078894721a15547a336488a761d716e72637f6224d3890284359d5d59ce65d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page