Skip to content

build_app

Builds your resource reservation app using the app config and resource yaml files you defined.

Parameters:

Name Type Description Default
app_config AppConfig | YamlPath

Either an AppConfig object, or a path to a yaml file to instantiate one from. Defaults to [CWD]/app-config.yaml.

None
resource_config_path DirectoryPath

Path to a folder full of resource config yaml files. Defaults to [CWD]/resource-configs/.

None
sqlite_dir DirectoryPath

Path to a folder where sqlite databases will be generated and stored. Each resource generates a database, and the reminder job scheduler generates an additional one that serves all resources. Defaults to [CWD]/sqlite-dbs/.

None
gcal_secret_path FilePath

Path to the json file holding static OAuth client ID desktop app credentials you generated and downloaded from https://console.cloud.google.com/apis/credentials. Defaults to [CWD]/.gcal-credentials/client-secret.json.

None
gcal_token_path FilePath | None

If desired, path to a json file to save the refresh token and temporary auth token to on first authenticating your credentials, to reduce token churn. If passed, the token is automatically refreshed if expired. Defaults to [CWD]/.gcal-credentials/auth-token.json.

None
site_dir DirectoryPath

Path of your desired mkdocs static site build directory. Defaults to [CWD]/site/.

None
request_classes type[ReservationRequest] | dict[str, type[ReservationRequest]]

Either a single global ReservationRequest model subclass to use for form input validation for all resources, one a dict of one subclass per resource, with keys matching the names of the resource config files (minus any integer prefixes for ordering). Defaults to ReservationRequest, the default base model class.

ReservationRequest

Returns:

Name Type Description
FastAPI FastAPI

The FastAPI instance for your app.