Skip to main content

coconnect

Send what users do on your platform to CoConnect Hub, named the way your platform already names it. CoConnect matches each event to the right task and rewards the member.

pip install coconnect
import os
from coconnect import CoConnect

hub = CoConnect(token=os.environ["COCONNECT_TOKEN"])

# When a user signs up (cc_id is the cookie set by https://hub.coconnect.co/sdk.js on your site):
hub.send("user_registered", user="u_1001", cc_id=request.cookies.get("cc_id"))

# Anything else, in your own words, with whatever details you have:
hub.send("ftd", user="u_1001", amount=75, currency="USD", id="dep_10482")
hub.send("kyc_failed", user="u_1001", status="failed", reason="Document unreadable")
  • user is required: your own ID for the user.
  • cc_id links the user to their CoConnect account. Send it at least once per user.
  • id is your reference for the event. If you leave it out, the SDK generates one, so a retried request is never counted twice.
  • Any other keyword arguments are kept as details of the event. Emails and phone numbers are hashed by CoConnect on arrival.
  • Batching: send_batch([...]) sends up to 50 events at once.

The SDK also handles:

  • Retries: network errors, 429 and 5xx responses are retried with backoff.
  • Errors: a bad token or a malformed event raises CoConnectError.
  • No dependencies beyond the standard library.

Keep your token on the server.

Metadata

Release files for coconnect 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for coconnect 1.0.0
File Size Uploaded Provenance
coconnect-1.0.0.tar.gz 4.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for coconnect 1.0.0
File Interpreter ABI Platform
coconnect-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 8.2 kB

Release files / coconnect-1.0.0.tar.gz

Download URL coconnect-1.0.0.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
0888f562c2d8e481228a2c6dbb0d63e4f75284d918da4fa3c4acc2bf06238474
BLAKE2b-256 checksum
How to use checksums
26322d7b40b11ffef4bf7d70a5f8faa39bb7c9ccd6bdb4bd92a0b4aa104066b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Release files / coconnect-1.0.0-py3-none-any.whl

Download URL coconnect-1.0.0-py3-none-any.whl
Size 4.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
318cca86914f28dd3f947601a9abaedcbeffee6800d2b27791a802f7612e0a82
BLAKE2b-256 checksum
How to use checksums
19cba50ec12c8579eda539d052afd91062cfd6ebdccb3456b7470402b29a18f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Security for coconnect 1.0.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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page