API reference#
Everything below is importable from the top-level anza package
(from anza import Setup), except the framework helpers in
anza.adapters. Every page is generated from the docstrings in the
source.
Operations#
|
Where the templates are and how to render and sign them. |
|
Render the page for a request route into a full HTML document. |
|
Render one template into an |
|
Render one template as a Server-Sent Event in one call. |
Engine and templates#
|
Loaded templates plus the validated signing key. |
|
How fragments are signed. |
How envelopes are signed: |
|
|
The loaded templates, by name. |
|
One parsed template, compiled once for fast binding. |
|
One piece of a parsed template. |
|
Split a template into static text and |
|
Bind |
|
HTML-escape |
Results#
Signing and verification#
|
A validated signing key, built once at setup. |
|
The key |
|
Verify a received envelope. |
|
The exact bytes a v2 envelope signature covers. |
Envelope wire-format version produced and accepted by this engine. |
|
HMAC-SHA256 signatures in lowercase hex (available as |
|
Ed25519 signing and verification (available as |
|
HKDF-SHA256 key derivation (available as |
|
SHA-256 digests (available as |
Streaming#
|
Frame an envelope as one Server-Sent Event. |
|
The WebSocket text message for an envelope: its compact JSON. |
Errors#
|
An engine error with a stable code. |
Adapters#
FastAPI / Starlette responses for pages and envelopes. |
|
Flask responses for pages and envelopes. |
|
Raw ASGI responses for pages and envelopes. |
|
Raw WSGI responses for pages and envelopes. |