build_app
Build a configured parking status FastAPI application.
The returned app loads its runtime dependencies during lifespan startup, registers
the space-status and waitlist routes, and serves the built static site from the
configured site_dir.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
space_update_model
|
type[SpaceUpdateBaseModel]
|
Concrete Pydantic payload model
used to validate parking sensor updates posted to the endpoint |
required |
app_config
|
AppConfig | YamlPath
|
Either an |
DEFAULT
|
sqlite_dir
|
DirectoryPath
|
Directory where the app stores its SQLite databases. Defaults to
|
DEFAULT
|
site_dir
|
DirectoryPath
|
Directory containing the built static site
to mount at |
DEFAULT
|
google_token_path
|
FilePath | None
|
Path to the saved Google OAuth
token JSON file used for refresh and reauthentication. Only required if the
email waitlist feature is enabled. Defaults to |
DEFAULT
|
waitlist_password_path
|
FilePath | None
|
Path to a text file
containing your chosen shared waitlist password. You can also set this with
the environment variable |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
FastAPI |
FastAPI
|
Configured application instance. |