Skip to main content

Glyph Protocol — Python SDK (verify + client)

Project description

glyph-protocol — Python SDK

Verify Glyph Protocol cards, receipts and key registries from Python, and call Glyph servers from agent code outside the Node.js ecosystem.

Install

pip install glyph-protocol

Verify a card

from glyph_protocol import verify_glyph

card = httpx.get("https://example.com/glyphs/refund-payment").json()
assert verify_glyph(card)

Call a glyph

from glyph_protocol import Client, verify_receipt

client = Client("https://example.com")
envelope = client.call("greet", {"name": "World"})
assert verify_receipt(envelope["receipt"])

Compatibility and feature parity

This SDK targets Glyph Protocol 1.0 and is tested against the canonical test vectors under spec/canonical/ in the main repo — so a value canonicalized or signed in Python verifies bit-identical to its TypeScript and Go counterparts.

Receipts use receiptVersion 0.3: servers generate the authoritative callId, and callers may pass an optional client correlation id.

Python currently covers protocol verification and client calls. TypeScript-only features include Provider Trust Resolver enforcement, attestation verifier plugins/policy gates, GlyphServer, and experimental FROST signing.

See spec/protocol.md and spec/rfcs/RFC-0001-key-registry.md for the normative protocol.

Project details


Download files

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

Source Distribution

glyph_protocol-1.2.0.tar.gz (10.9 kB view details)

Uploaded Source

Built Distribution

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

glyph_protocol-1.2.0-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file glyph_protocol-1.2.0.tar.gz.

File metadata

  • Download URL: glyph_protocol-1.2.0.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for glyph_protocol-1.2.0.tar.gz
Algorithm Hash digest
SHA256 60a57b876b92e9844659de7b279bb5ca48790b66f1e7c45282a0d8592e50c023
MD5 b5f0df750b6e56accd689286f8e7eff7
BLAKE2b-256 a323d3ce6b890c80c476433159ae497d8d2a07ebf50d5a099c2fd36420779a15

See more details on using hashes here.

File details

Details for the file glyph_protocol-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: glyph_protocol-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for glyph_protocol-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 975d24ffd063d0a95a5eb5435dac8f93da66b6d03d4b7fadd5a93d20e33260ec
MD5 cbc704b877fcd0ea5faaed32e77c0db7
BLAKE2b-256 08b214751d65532c5868002e69c64359ba516f98eb6d32b42e115a98878a93fe

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 Pingdom Monitoring Sentry Error logging StatusPage Status page