Skip to content

pixano.app.settings

Settings

Bases: BaseSettings

Pixano app settings.

Attributes:

Name Type Description
data_dir Path | S3Path

Root data directory. If library_dir, media_dir, or models_dir are not provided, they are derived as data_dir/library, data_dir/media, and data_dir/models respectively.

library_dir Path | S3Path

Local or S3 path to dataset library. Overrides data_dir/library if provided.

media_dir Path | S3Path

Local or S3 path to media library. Overrides data_dir/media if provided.

models_dir Path | None

Models directory as Path. Overrides data_dir/models if provided. Must be provided if library_dir is an S3 path.

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.

inference_providers dict[str, Any]

Dictionary of connected inference providers (InferenceProvider instances), keyed by name.

default_inference_provider str | None

Name of the default inference provider to use.

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()