Skip to main content

htl-verify

Verify X-Trust signed human-presence headers in Python. Standard library only.

Install

pip install htl-verify

Use

from htl_verify import verify, Untrusted

try:
    claims = verify(header, key=secret_bytes)
    score = claims["score"]
    if score >= 0.5:
        pass  # annotated as likely-human
except Untrusted:
    pass  # treat as unverified; never blocks by default

What it is not

Not a CAPTCHA, not identity, not bot authentication. The score is a signal, not a proof. A determined client can raise its own score; that is a property of any client-side signal and is documented in the project SPEC.

Wire format

X-Trust: v1.<payload_b64url>.<sig_b64url>

Payload JSON: {sub, score, iat, exp, nonce?}. HMAC-SHA256 over the base64url payload. TTL 120s. Score 0..1.

Download files

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

Source Distribution

htl_verify-1.0.0.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

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

htl_verify-1.0.0-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

File details

Details for the file htl_verify-1.0.0.tar.gz.

File metadata

  • Download URL: htl_verify-1.0.0.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for htl_verify-1.0.0.tar.gz
Algorithm Hash digest
SHA256 ee79d87719aa72279103b9c36d43aab8cc53762e47ee46df8fd13a39414bb125
MD5 b5fb42f78b59f036cd55be845d9e583a
BLAKE2b-256 6f9eb3435862139d592c3f8ec31694c2ab852bb92f992370988f444aa578f9b5

See more details on using hashes here.

Provenance

The following attestation bundles were made for htl_verify-1.0.0.tar.gz:

Publisher: publish-pypi.yml on htl-syterme/htl-core

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file htl_verify-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: htl_verify-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 2.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for htl_verify-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 97aa1f690933637150d3cba622259f85d831a67224c090ab6a7fd96fd1ecb989
MD5 acfe721c9464801416b7b3a324965c6b
BLAKE2b-256 97bf1edac275db54a08796917813051c22473c955ee47f6f506db0e3efd3ddf5

See more details on using hashes here.

Provenance

The following attestation bundles were made for htl_verify-1.0.0-py3-none-any.whl:

Publisher: publish-pypi.yml on htl-syterme/htl-core

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 files

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