bundle.website.core.pages¶
Reusable page registration primitives for website sites.
Classes¶
Structural interface a page module must satisfy to be registered. |
Functions¶
|
Attach a single page router and its static directory to the app. |
|
Attach all pages and expose registry/navigation metadata on app state. |
Module Contents¶
- class bundle.website.core.pages.Page¶
Bases:
ProtocolStructural interface a page module must satisfy to be registered.
- router: fastapi.routing.APIRouter¶
- static_path: pathlib.Path | None¶
- bundle.website.core.pages.mount_page(app: fastapi.FastAPI, page: Page) None¶
Attach a single page router and its static directory to the app.
- bundle.website.core.pages.initialize_pages(app: fastapi.FastAPI, pages: collections.abc.Iterable[Page]) tuple[Page, Ellipsis]¶
Attach all pages and expose registry/navigation metadata on app state.