Files
rose-ash/relations/app.py
giles e30cb0a992
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 16m38s
Auto-mount fragment handlers: eliminate fragment blueprint boilerplate across all 8 services
Fragment read API is now fully declarative — every handler is a defhandler
s-expression dispatched through one shared auto_mount_fragment_handlers()
function. Replaces 8 near-identical blueprint files (~35 lines each) with
a single function call per service. Events Python handlers (container-cards,
account-page) extracted to a standalone module.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 19:13:15 +00:00

27 lines
705 B
Python

from __future__ import annotations
import path_setup # noqa: F401
import sx.sx_components as sx_components # noqa: F401 # ensure Hypercorn --reload watches this file
from shared.infrastructure.factory import create_base_app
from bp import register_actions, register_data
from services import register_domain_services
def create_app() -> "Quart":
app = create_base_app(
"relations",
domain_services_fn=register_domain_services,
)
app.register_blueprint(register_actions())
app.register_blueprint(register_data())
from shared.sx.handlers import auto_mount_fragment_handlers
auto_mount_fragment_handlers(app, "relations")
return app
app = create_app()