Skip to main content

The official Python SDK for the Dissectica Customer Data Platform.

Project description

Dissectica CDP Python Client

This is the official Python SDK for the Dissectica Customer Data Platform.

The client is asynchronous, thread-safe, and uses a local SQLite database for resilient event batching, ensuring no data is lost during network failures or application crashes.

Installation

pip install dissectica-cdp-client

Quick start

import time
from cdp_client import CDPClient

# 1. Configuration
HOST = "[http://your-producer.example.com](http://your-producer.example.com)"
PROJECT_KEY = "YOUR_PROJECT_KEY"
SCHEMA_LIST = ["user_product_purchase_schema_updated"]

# 2. Initialize the client
# This starts the background flushing thread
client = CDPClient(
    host=HOST,
    project_key=PROJECT_KEY,
    schema_names=SCHEMA_LIST,
    flush_interval=10 # Auto-flush every 10 seconds
)

# 3. Track an event
# This is a fast, non-blocking call.
client.track({
    "user_id": "user-12345",
    "session_id": "session-abc",
    "event_type": "PAGE_VIEW",
    "page_url": "/product/test"
})

# Give the background thread time to send
time.sleep(15)

# 4. Shut down (sends any remaining events)
client.shutdown()

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

dissectica_cdp_client-0.1.0.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

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

dissectica_cdp_client-0.1.0-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file dissectica_cdp_client-0.1.0.tar.gz.

File metadata

  • Download URL: dissectica_cdp_client-0.1.0.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for dissectica_cdp_client-0.1.0.tar.gz
Algorithm Hash digest
SHA256 512f699271235fb1b707429061ea148c61e14c5f871ffe8d08be9d50e02f654e
MD5 ea5895c5de50fe363d7e97101f28cdfe
BLAKE2b-256 624111f5eca0bd5a55646e2abe31e2d665414a04de28c2d1709fcc168a5d7abd

See more details on using hashes here.

File details

Details for the file dissectica_cdp_client-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for dissectica_cdp_client-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ab4126f74efa6e3ff98075098fbe8991397ed6c2e585e4a1101215770aeac42c
MD5 ae6392b839099011369bc90ec1a84f60
BLAKE2b-256 3c865aecfb445f90bf6d1405301d5736ce34da42ecfceae1b2c9a709a5898146

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