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.5.tar.gz (27.6 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.5-py3-none-any.whl (35.3 kB view details)

Uploaded Python 3

File details

Details for the file snowplow_signals-0.4.5.tar.gz.

File metadata

  • Download URL: snowplow_signals-0.4.5.tar.gz
  • Upload date:
  • Size: 27.6 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.5.tar.gz
Algorithm Hash digest
SHA256 1de9937a02f891eb0f07da92ee0fa4b981781d9f91c80ebaee641fbb3c6983c7
MD5 835be43d314e0482094caac792fd6ddd
BLAKE2b-256 859bd780e8445599041b17f7bdacbc030e72a825c0872cdc48b7090f33024c95

See more details on using hashes here.

File details

Details for the file snowplow_signals-0.4.5-py3-none-any.whl.

File metadata

  • Download URL: snowplow_signals-0.4.5-py3-none-any.whl
  • Upload date:
  • Size: 35.3 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 092809ca860ea308521559af3e87a41e7a23141ff3497526aa921d539a441175
MD5 d21c98a88cca82d1391c2771e90d4728
BLAKE2b-256 7b37cc3ac14f221d2cac9ed0df7eb1311ab5e46fa2556329a644fd22d118ed82

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