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 dissectica 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dissectica_cdp_client-0.1.1.tar.gz.
File metadata
- Download URL: dissectica_cdp_client-0.1.1.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
852c18370cc50e01b6e932f79fe2bf588906d7d4184878db9897addf02c49cd7
|
|
| MD5 |
1f0669e38dd14ebda03089565a3a3f72
|
|
| BLAKE2b-256 |
b1e7fcd3d450719b78b67e9feaf4f084b9ebf2b060c6d4c9568777e2c5907bf7
|
File details
Details for the file dissectica_cdp_client-0.1.1-py3-none-any.whl.
File metadata
- Download URL: dissectica_cdp_client-0.1.1-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
22feb43167aa2ce8e82c5a47b3a50d8e6abe636428f15f3e10798b25a408758f
|
|
| MD5 |
8b140bb1538caedb36a11a4428c3e2a4
|
|
| BLAKE2b-256 |
0f1c66ab6e8e8b28a1eb0ffe44467475baccab21fa67b8e04c5e1599ea2d4b30
|