cloud_server.server

Pi Dashboard server module.

Classes

CloudServer([config])

Cloud FastAPI server.

class cloud_server.server.CloudServer(config=None)[source]

Cloud FastAPI server.

__init__(config=None)[source]

Initialize the CloudServer.

Parameters:

config (CloudServerConfig | None) – Optional pre-loaded configuration

property server_directory: Path

Get the server directory path.

property storage_directory: Path

Get the storage directory path.

property thumbnails_directory: Path

Get the thumbnails directory path.

property routers: list[BaseRouter]

Define the API routers for the server.

Return list[BaseRouter]:

List of API routers

validate_config(config_data)[source]

Validate configuration data against the CloudServerConfig model.

Parameters:

config_data (dict) – The configuration data to validate

Return CloudServerConfig:

The validated configuration model

Return type:

CloudServerConfig