Skip to content

src/dazzle_ui/runtime/experience_routes.py

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

Commit: 615f1354a103

Language: python

Scope: dazzle_ui

Purpose

Experience flow route handler.

Creates FastAPI routes for multi-step experience flows: - GET /experiences/{name} — redirect to current/start step - GET /experiences/{name}/{step} — render a step - POST /experiences/{name}/{step}?event=X — process transition

Key Exports

  • _ExperienceDeps
  • create_experience_routes

Dependencies

Imports

  • asyncio
  • json
  • logging
  • urllib.request
  • collections.abc.Callable
  • dataclasses.dataclass
  • dataclasses.field
  • functools.partial
  • pathlib.Path
  • typing.Any
  • dazzle.core.ir
  • dazzle.core.ir.experiences.StepKind
  • dazzle.core.manifest.resolve_api_url
  • dazzle.core.strings.to_api_plural
  • dazzle_ui.utils.expression_eval.evaluate_simple_condition
  • fastapi.APIRouter
  • fastapi.Request
  • fastapi.responses.HTMLResponse
  • fastapi.responses.RedirectResponse
  • fastapi.responses.Response

Event Interactions

None detected.

Invariants and Assumptions

No invariants documented.

Tests

  • tests/unit/test_experience_routes.py
  • tests/integration/test_runtime_e2e.py
  • tests/integration/test_runtime_pipeline.py
  • tests/unit/test_runtime_test_routes.py
  • tests/unit/test_runtime_services.py

Notes

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