Skip to main content

htl-sign

Generate X-Trust signed human-presence HTTP headers. Standard library only.

Install

pip install htl-sign

Usage

from htl_sign import build_x_trust_header
headers = build_x_trust_header(secret="your_secret", sub="user-1", score=0.88)
# headers == {"X-Trust": "v1.eyJ...signature"}

What it does

Signs a JSON payload {sub, score, iat, exp} with HMAC-SHA256, base64url-encoded, prefixed with "v1.". Compatible with htl-verify (Python) and @htl-syterme/htl-core (TypeScript).

  • Spec: github.com/htl-syterme/htl-core/blob/main/SPEC.md
  • Dashboard: htl-syterme.github.io/htl-core

Download files

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

Source Distribution

htl_sign-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_sign-1.0.0-py3-none-any.whl (2.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: htl_sign-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_sign-1.0.0.tar.gz
Algorithm Hash digest
SHA256 6f6d9f61048db02c25ee94355b5f21329df47fc056ad538e11dd48a179b58342
MD5 1604a78a2cf665fcbaf9af2ed0d477e6
BLAKE2b-256 e7d9c83761b51946d8068b28d98ab9c726fcc541c616cbdf53c8d2af47a17f8b

See more details on using hashes here.

Provenance

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

Publisher: publish-pypi-sign.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_sign-1.0.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for htl_sign-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eb70ccf5321eec07d2da930ae98b64ae890187c495186a820a05ef5eda3af0bd
MD5 1bb6df6c4579bb044b4f727a6078a920
BLAKE2b-256 762ab673e545fbf7883c9514f051b5f32ad24ddc6850c1cc6764a96de3f89d33

See more details on using hashes here.

Provenance

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

Publisher: publish-pypi-sign.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