bundle.website.core¶
Public API for website core application composition.
Submodules¶
Classes¶
Minimal site contract consumed by the website core app factory. |
|
Structural interface a page module must satisfy to be registered. |
Functions¶
|
Create a FastAPI app from the provided site manifest. |
|
Attach all pages and expose registry/navigation metadata on app state. |
|
Attach a single page router and its static directory to the app. |
Package Contents¶
- bundle.website.core.create_app(manifest: bundle.website.core.manifest.SiteManifest | None = None) fastapi.FastAPI¶
Create a FastAPI app from the provided site manifest.
- class bundle.website.core.SiteManifest¶
Minimal site contract consumed by the website core app factory.
- static_path: pathlib.Path | None = None¶
- components_path: pathlib.Path | None = None¶
- initialize_pages: InitializePages | None = None¶
- class bundle.website.core.Page¶
Bases:
ProtocolStructural interface a page module must satisfy to be registered.
- router: fastapi.routing.APIRouter¶
- static_path: pathlib.Path | None¶
- bundle.website.core.initialize_pages(app: fastapi.FastAPI, pages: collections.abc.Iterable[Page]) tuple[Page, Ellipsis]¶
Attach all pages and expose registry/navigation metadata on app state.