Skip to content

src/dazzle_back/runtime/server.py

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

Commit: 615f1354a103

Language: python

Scope: dazzle_back

Purpose

Runtime server - creates and runs a FastAPI application from AppSpec.

This module provides the main entry point for running a Dazzle backend application.

Key Exports

  • ServerConfig
  • DazzleBackendApp
  • build
  • app
  • models
  • services
  • get_service
  • auth_store
  • auth_middleware
  • auth_enabled
  • file_service
  • files_enabled
  • test_mode_enabled
  • dev_mode_enabled
  • repositories
  • service_loader
  • channel_manager
  • channels_enabled
  • process_manager
  • process_adapter

Dependencies

Imports

  • logging
  • dataclasses.dataclass
  • dataclasses.field
  • datetime.datetime
  • pathlib.Path
  • typing.TYPE_CHECKING
  • typing.Any
  • pydantic.BaseModel
  • dazzle.core.ir.AppSpec
  • dazzle_back.runtime._fastapi_compat.FASTAPI_AVAILABLE
  • dazzle_back.runtime._fastapi_compat.FastAPI
  • dazzle_back.runtime._fastapi_compat.FastAPI
  • dazzle_back.runtime.auth.AuthMiddleware
  • dazzle_back.runtime.auth.AuthStore
  • dazzle_back.runtime.file_routes.create_file_routes
  • dazzle_back.runtime.file_routes.create_static_file_routes
  • dazzle_back.runtime.file_storage.FileService
  • dazzle_back.runtime.integration_manager.IntegrationManager
  • dazzle_back.runtime.integration_manager._convert_channels
  • dazzle_back.runtime.migrations.MigrationPlan

Event Interactions

None detected.

Invariants and Assumptions

  • Assert: self._app is not None
  • Assert: self._subsystem_ctx is not None
  • GZip compression (v0.33.0) — must be added before other middleware

  • Assert: database_url required for tenant isolation
  • Assert: self._database_url is not None

Tests

  • tests/unit/test_qa_server.py
  • tests/unit/test_build_server_config.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.