pycustomerhub
Python client SDK for PyCustomerHub, an open-source, event-driven Customer Data & Engagement Platform.
Mirrors sdk/js exactly in scope: PyCustomerHubClient covers the core
send-an-event / read-a-profile loop (the same three methods the TS client
exposes), not one method per API endpoint. Everything else — audiences,
governance, channels, templates, journeys — is typed in pycustomerhub.types
for use with your own requests calls against the REST API, the same role
apiFetch<T> plays against the TS types for ui/.
Install
pip install pycustomerhub
The pre-rebrand messagebirds import still works through a deprecated
compatibility shim.
Usage
from pycustomerhub import PyCustomerHubClient, EventEnvelope
client = PyCustomerHubClient("http://localhost:8080")
envelope: EventEnvelope = {
"event_id": "...",
"event_type": "commerce.product_view",
"timestamp": "2026-09-18T00:00:00Z",
"source": {"type": "web", "name": "website"},
"identity": [{"namespace": "anonymous_id", "value": "anon-1", "primary": True, "source": "sdk"}],
"schema": {"name": "commerce.product_view", "version": "1.0"},
"data": {"product_id": "p1"},
"context": {"profile_updates": {"core/person@1.0": {"first_name": "Jane"}}},
"tenant_id": "...",
}
client.send_event(envelope)
profile = client.find_profile_by_identity("<tenant_id>", "anonymous_id", "anon-1")
Development
pip install -e ".[dev]"
pytest
License
Apache-2.0. See LICENSE.
Metadata
Release files for pycustomerhub 0.8.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pycustomerhub-0.8.0.tar.gz | 9.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pycustomerhub-0.8.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 22.0 kB
Release files / pycustomerhub-0.8.0.tar.gz
| Download URL | pycustomerhub-0.8.0.tar.gz |
|---|---|
| Size | 9.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6b46b69c77b7ff8cea6e69123125d4994983862bfe218c9f2d3aa246a7cf8247
|
|
BLAKE2b-256 checksum How to use checksums |
2b8d731fb26f267aa4197c4dfd8493b37e789b07303902e973c879582365626a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Release files / pycustomerhub-0.8.0-py3-none-any.whl
| Download URL | pycustomerhub-0.8.0-py3-none-any.whl |
|---|---|
| Size | 12.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
292902a10b32d623b951bbdbb967a53270d42df825b553f98785bda1d6562ac5
|
|
BLAKE2b-256 checksum How to use checksums |
809bb42b47f2ec5c20b0fceccf7e3710003e355430f58011592013323565b751
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Security for pycustomerhub 0.8.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.