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.4.0.tar.gz (17.4 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.4.0-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: chitmark-0.4.0.tar.gz
  • Upload date:
  • Size: 17.4 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.4.0.tar.gz
Algorithm Hash digest
SHA256 9bcecbeb68af9205ddfadbef7f55081b9e0c5c0599622c08bcfb7bd0d6ba112d
MD5 9ed4d5b911091cb8548b990873c6ce49
BLAKE2b-256 1cecbc05a6613cf669f8507d396ed7fdadaf7c952c33d0c691e63368bb88c18e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chitmark-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 13.4 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.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d68815991970ffa1f945198c206ac31e8de5d477c9dd19bbaae63f5a94bf776c
MD5 0541fe76075404b65aafcf776758a122
BLAKE2b-256 b5f1d15ce5e2750ea0b4c01f23f98617190617f635b216a9785164616348a873

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