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.1.1.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.1.1-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: chitmark-0.1.1.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.1.1.tar.gz
Algorithm Hash digest
SHA256 93f2d9ce8fc13ef7f7960569ed5e7251cd128a35eafe811746d54df7b3c011e3
MD5 e4bf1ebd96058d640a1463c9cc274ebd
BLAKE2b-256 8cac3a283d8a5a4838214b33f46a6aa7f7aefdb0db576062f4d9c1d4a3f5db07

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chitmark-0.1.1-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.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a369de7e931422fc5ae981ab5991f976c6d0b8a2f73ca2f76332fea5f85c7c99
MD5 69991cf182aa45fbdf505c17f099ce08
BLAKE2b-256 40d5d17667faa32f16f1ef16f912991559b051fea5178e13e6951fbdba9e01f7

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