Skip to main content

chitmark (Python)

Official Python SDK for Chitmark — trust decisions on agent-mediated actions, tuned by business outcomes (verify / feedback / challenge).

PyPI version

Requires Python ≥ 3.10.

Install

pip install chitmark
# or
uv add chitmark

Quick start

from chitmark import Chitmark

client = Chitmark(api_key="ck_live_...")

verdict = client.verify(
    action="signup",
    session="sess_9f3a",
    surface="app.acme.com/signup",
    subject={
        "email": "buyer@acmecorp.com",
        "ip": "203.0.113.7",
        "userAgent": "...",
    },
)
# Persist verdict["eventId"] on the account row — feedback joins only on that id.
# Default pii_mode="hashed" minimizes email/IP before the wire.

API

Three verbs:

Method Endpoint Purpose
client.verify(...) POST /v1/verify Decide
client.feedback(...) POST /v1/feedback Learn
client.challenge(...) POST /v1/challenge Escalate

Golden rule: fail to challenge, never to allow. Timeouts return a degraded challenge verdict.

Feedback

Attribution is a schema contract, not a lookup: store the eventId from verify on the account row, then report outcomes against that same id — never a derived or guessed id.

# At signup: persist the join key
verdict = client.verify(action="signup", subject={"email": "a@b.com"})
db.accounts.update(user_id, chitmark_event_id=verdict["eventId"])

# Later, when a label matures (credit burn, chargeback, …):
client.feedback(
    event_id=account.chitmark_event_id,  # the stored join key — never guessed
    outcome="credit_burn",
    value=87.4,
    unit="usd",
    observed_at="2026-08-06T04:00:00Z",
)

PII

Mode Behavior
hashed (default) SHA-256 email, /24 IP truncation, minimized form fields
none Derived/header-shape signals only
raw Tenant opt-in only; higher compliance review

Develop

cd packages/sdk-python
uv sync --extra dev   # or: pip install -e ".[dev]"
pytest
ruff check .

Resources

License

Proprietary — see LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chitmark-0.2.0.tar.gz (13.7 kB view details)

Uploaded Source

Built Distribution

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

chitmark-0.2.0-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

Details for the file chitmark-0.2.0.tar.gz.

File metadata

  • Download URL: chitmark-0.2.0.tar.gz
  • Upload date:
  • Size: 13.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for chitmark-0.2.0.tar.gz
Algorithm Hash digest
SHA256 1fed60941b52bf874f169afdf825265d2c7ecd5a8abf1a45b897ba2482d48066
MD5 332698e18d6033a0efdec2dec7eeb946
BLAKE2b-256 fcd4789f62199397a3f7b657fd0e37a241a2c4490a8b0508b11b11e7a43a3b8c

See more details on using hashes here.

File details

Details for the file chitmark-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: chitmark-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 12.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for chitmark-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fba72fb07e3e9c05c3bed161affa46cedcc07dc7823bfd2723f22c5a1023cd09
MD5 80e54aeaf8fa477d242ad21d162a1ecd
BLAKE2b-256 8443c6c0141506492599b63275489d781fea6a4139b3b6556c91cdaf4e618821

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 Sentry Error logging StatusPage Status page