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.1.0.tar.gz (10.2 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.1.0-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: glyph_protocol-1.1.0.tar.gz
  • Upload date:
  • Size: 10.2 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.1.0.tar.gz
Algorithm Hash digest
SHA256 42d507eab34221805c15e5dcd9aa5d64abe6931300b3a5408017e0c88f95e3e0
MD5 f777a035a688889171b461eaed5f05bb
BLAKE2b-256 9feaa8e383b6c3db1f8601ae001ea443bb942ea9003e9ec9f80d56f0082bea62

See more details on using hashes here.

File details

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

File metadata

  • Download URL: glyph_protocol-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.8 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 88957ca1a226394b903e91adb35cbc13f9190ddb9e617dc2d779eb1d76419307
MD5 5c6a01ce8849d5f766774cd16ead1308
BLAKE2b-256 2f94c12c03859613f07066f2be3584c3c8d4ce5b87395ec2134786554b3171d5

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