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.3.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.3.0-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: chitmark-0.3.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.3.0.tar.gz
Algorithm Hash digest
SHA256 340d9fba433e79e6ef46d9e85b0814ef02429f1881473fa96b7eb75ab001d005
MD5 4250c7537cedd0040f0a73217afb87b0
BLAKE2b-256 88a9b9390d13f6f4dff9f369b030a4709cfe4f6e76196021f41065ea64992d62

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chitmark-0.3.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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9bf341da3e3bcfb2d2d6b0441a2912395a3b5217fc2efa6e5f2e58227f3a9a49
MD5 b38fdd82d5ca55764d60f00b6bf717cf
BLAKE2b-256 d72ed112703b0c298b4f8e0aeb85015f1f6953ffb28c1a15d039988b79055b38

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