Skip to content

src/dazzle_back/runtime/service_loader.py

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

Commit: 615f1354a103

Language: python

Scope: dazzle_back

Purpose

Service loader for domain service stubs.

Discovers, loads, and manages user-implemented domain service stubs. These are Turing-complete Python functions that implement business logic declared in DSL as service contracts.

The loader: 1. Discovers stub files in the services/ directory 2. Dynamically...

Key Exports

  • ServiceLoadError
  • ServiceInvocationError
  • LoadedService
  • ServiceLoader
  • create_service_loader
  • load_services
  • invoke
  • has_service
  • get_service_ids
  • get_service
  • reload_service
  • unload_all

Dependencies

Imports

  • __future__.annotations
  • importlib.util
  • logging
  • sys
  • collections.abc.Callable
  • dataclasses.dataclass
  • dataclasses.field
  • pathlib.Path
  • typing.Any

Event Interactions

None detected.

Invariants and Assumptions

No invariants documented.

Tests

  • tests/unit/test_service_loader.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.