Skip to content

src/dazzle_ui/runtime/htmx.py

Generated: 2026-03-30T04:38:49.053151+00:00

Commit: 615f1354a103

Language: python

Scope: dazzle_ui

Purpose

HTMX-aware response utilities.

Provides helpers for building HTMLResponse objects with HX-* headers for server-client event coordination (triggers, retarget, reswap, redirect).

This is the canonical location for HTMX presentation logic. The dazzle_back.runtime.htmx_response module re-exports ...

Key Exports

  • HtmxDetails
  • htmx_response
  • htmx_trigger_headers
  • is_htmx_request
  • htmx_error_response
  • json_or_htmx_error
  • from_request
  • wants_partial
  • wants_fragment
  • wants_drawer

Dependencies

Imports

  • __future__.annotations
  • json
  • dataclasses.dataclass
  • typing.Any
  • fastapi.responses.HTMLResponse
  • fastapi.responses.JSONResponse
  • dazzle_ui.runtime.template_renderer.render_fragment

Event Interactions

None detected.

Invariants and Assumptions

No invariants documented.

Tests

  • tests/unit/test_htmx_details.py
  • tests/unit/test_ux_htmx_client.py
  • tests/integration/test_runtime_e2e.py
  • tests/integration/test_runtime_pipeline.py
  • tests/unit/test_runtime_test_routes.py

Notes

This page was automatically generated by tools/gen_reference_docs.py.