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.6.tar.gz (27.8 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.6-py3-none-any.whl (35.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: snowplow_signals-0.4.6.tar.gz
  • Upload date:
  • Size: 27.8 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.6.tar.gz
Algorithm Hash digest
SHA256 2531b1f2d0b0e5364ff6a98f6375c69823c9e0af814b7e11ca8adfc921cefa90
MD5 40acf69bdfb3d0c55aa583b363d742cf
BLAKE2b-256 7af5c322c74b3241d9860ddc06117a2e236ec7e38546d25e75741b253adef4f2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: snowplow_signals-0.4.6-py3-none-any.whl
  • Upload date:
  • Size: 35.5 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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 f2b02ab6be24ac78b7e8bd669dc5c60c27a5784cc92c2d0f28360944e9b32df4
MD5 2a0da5bc97dc4e9cc39731616f51657b
BLAKE2b-256 03a6c80d073ffec08dac2126b8258b89595b565e0179b501c00d13a1010b0aaf

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