bundle.website.core =================== .. py:module:: bundle.website.core .. autoapi-nested-parse:: Public API for website core application composition. Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/bundle/website/core/app/index /autoapi/bundle/website/core/component/index /autoapi/bundle/website/core/downloader/index /autoapi/bundle/website/core/manifest/index /autoapi/bundle/website/core/pages/index /autoapi/bundle/website/core/security/index /autoapi/bundle/website/core/static/index /autoapi/bundle/website/core/templating/index /autoapi/bundle/website/core/ws_messages/index Classes ------- .. autoapisummary:: bundle.website.core.SiteManifest bundle.website.core.Page Functions --------- .. autoapisummary:: bundle.website.core.create_app bundle.website.core.initialize_pages bundle.website.core.mount_page Package Contents ---------------- .. py:function:: create_app(manifest: bundle.website.core.manifest.SiteManifest | None = None) -> fastapi.FastAPI Create a FastAPI app from the provided site manifest. .. py:class:: SiteManifest Minimal site contract consumed by the website core app factory. .. py:attribute:: title :type: str :value: 'Bundle Website' .. py:attribute:: static_mount_path :type: str :value: '/static' .. py:attribute:: components_mount_path :type: str :value: '/components-static' .. py:attribute:: static_path :type: pathlib.Path | None :value: None .. py:attribute:: components_path :type: pathlib.Path | None :value: None .. py:attribute:: initialize_pages :type: InitializePages | None :value: None .. py:class:: Page Bases: :py:obj:`Protocol` Structural interface a page module must satisfy to be registered. .. py:attribute:: name :type: str .. py:attribute:: slug :type: str .. py:attribute:: href :type: str .. py:attribute:: description :type: str .. py:attribute:: router :type: fastapi.routing.APIRouter .. py:attribute:: static_path :type: pathlib.Path | None .. py:attribute:: show_in_nav :type: bool .. py:attribute:: show_on_home :type: bool .. py:function:: initialize_pages(app: fastapi.FastAPI, pages: collections.abc.Iterable[Page]) -> tuple[Page, Ellipsis] Attach all pages and expose registry/navigation metadata on app state. .. py:function:: mount_page(app: fastapi.FastAPI, page: Page) -> None Attach a single page router and its static directory to the app.