Skip to content

pixano.app.settings

Settings

Bases: BaseSettings

Pixano app settings.

Attributes:

Name Type Description
library_dir Path | S3Path

Local or S3 path to dataset library. If not provided, it is set to './library/'.

media_dir Path | S3Path

Local or S3 path to media library. If not provided, it is set to './media/'.

models_dir Path | None

Models directory as Path. Must be provided if library_dir is an S3 path else it is set to 'library_dir/models'

aws_endpoint str | None

S3 endpoint URL, use 'AWS' if not provided. Used if library_dir is an S3 path.

aws_region str | None

S3 region name, not always required for private storages. Used if library_dir is an S3 path.

aws_access_key str | None

S3 AWS access key. Used if library_dir is an S3 path.

aws_secret_key str | None

S3 AWS secret key. Used if library_dir is an S3 path.

get_settings() cached

Get app settings.

Returns:

Type Description
Settings

App settings.

Source code in pixano/app/settings.py
@lru_cache
def get_settings() -> Settings:
    """Get app settings.

    Returns:
        App settings.
    """
    return Settings()