SealSkin
Server Reference

api

FastAPI application factory and lifespan.

The application object is created here and every router is registered. State initialisation, cache refreshes, the configuration file watcher and the background jobs live in lifespan.

attributelogger
= logging.getLogger(__name__)
attributeapi_app
= create_app()
func_remove_stale_sessions() -> None

Drop persisted sessions whose containers no longer exist.

Returns

None
funcbackground_update_job() -> None

Periodically refresh store caches, pull images and prune dangling ones.

Returns

None
funcbackground_share_cleanup_job() -> None

Periodically delete expired public shares.

Returns

None
func_reload_installed_apps(_path) -> None

Watcher callback: reload installed apps after an external edit.

param_pathstr

Returns

None
func_reload_app_stores(_path) -> None

Watcher callback: reload app stores after an external edit.

param_pathstr

Returns

None
func_reload_templates(_path) -> None

Watcher callback: reload templates after an external edit.

param_pathstr

Returns

None
func_reload_users(_path) -> None

Watcher callback: reload users and groups after an external edit.

param_pathstr

Returns

None
func_watch_targets() -> dict[str, persistence.ReloadCallback]

Return the configuration paths to watch and their reload callbacks.

Returns

dict[str, app.persistence.app.persistence.ReloadCallback]
func_warn_if_cert_expiring(days=14) -> None

Log a warning when the proxy TLS certificate is expired or about to expire.

paramdaysint
= 14

Returns

None
funclifespan(app) -> AsyncIterator[None]

Initialise state on startup and stop background tasks on shutdown.

paramappFastAPI

Returns

collections.abc.AsyncIterator[None]
funccreate_app() -> FastAPI

Build the FastAPI application with every router registered.

Returns

fastapi.FastAPI

The configured FastAPI instance.