settings

Application settings

Project Settings.

pydantic settings src.server.lib.settings.APISettings[source]

Bases: BaseSettings

API specific configuration.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Show JSON schema
{
   "title": "APISettings",
   "description": "API specific configuration.",
   "type": "object",
   "properties": {
      "HEALTH_PATH": {
         "default": "/health",
         "title": "Health Path",
         "type": "string"
      },
      "OPENCOLLECTIVE_KEY": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Opencollective Key"
      },
      "OPENCOLLECTIVE_URL": {
         "default": "https://api.opencollective.com/graphql/v2",
         "title": "Opencollective Url",
         "type": "string"
      },
      "POLAR_KEY": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Polar Key"
      },
      "POLAR_URL": {
         "default": "https://api.polar.sh",
         "title": "Polar Url",
         "type": "string"
      }
   }
}

Config:
  • extra: str = ignore

  • case_sensitive: bool = True

  • env_prefix: str = API_

  • env_file: str = .env

Fields:
field HEALTH_PATH: str = '/health'

Route that the health check is served under.

field OPENCOLLECTIVE_KEY: str | None = None

OpenCollective API key.

field OPENCOLLECTIVE_URL: str = 'https://api.opencollective.com/graphql/v2'

OpenCollective API URL.

Note

This is the GraphQL endpoint, the REST endpoint is no longer maintained. See also: OpenCollective API Docs

field POLAR_KEY: str | None = None

Polar API key.

field POLAR_URL: str = 'https://api.polar.sh'

Polar API URL.

model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

pydantic settings src.server.lib.settings.DatabaseSettings[source]

Bases: BaseSettings

Configures the database for the application.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Show JSON schema
{
   "title": "DatabaseSettings",
   "description": "Configures the database for the application.",
   "type": "object",
   "properties": {
      "ECHO": {
         "default": false,
         "title": "Echo",
         "type": "boolean"
      },
      "ECHO_POOL": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "const": "debug"
            }
         ],
         "default": false,
         "title": "Echo Pool"
      },
      "POOL_DISABLE": {
         "default": true,
         "title": "Pool Disable",
         "type": "boolean"
      },
      "POOL_MAX_OVERFLOW": {
         "default": 10,
         "title": "Pool Max Overflow",
         "type": "integer"
      },
      "POOL_SIZE": {
         "default": 5,
         "title": "Pool Size",
         "type": "integer"
      },
      "POOL_TIMEOUT": {
         "default": 30,
         "title": "Pool Timeout",
         "type": "integer"
      },
      "POOL_RECYCLE": {
         "default": 300,
         "title": "Pool Recycle",
         "type": "integer"
      },
      "POOL_PRE_PING": {
         "default": false,
         "title": "Pool Pre Ping",
         "type": "boolean"
      },
      "CONNECT_ARGS": {
         "default": {},
         "title": "Connect Args",
         "type": "object"
      },
      "URL": {
         "default": "postgresql+asyncpg://byte:bot@localhost:5432/byte",
         "title": "Url",
         "type": "string"
      },
      "ENGINE": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Engine"
      },
      "USER": {
         "default": "byte",
         "title": "User",
         "type": "string"
      },
      "PASSWORD": {
         "default": "bot",
         "title": "Password",
         "type": "string"
      },
      "HOST": {
         "default": "localhost",
         "title": "Host",
         "type": "string"
      },
      "PORT": {
         "default": 5432,
         "title": "Port",
         "type": "integer"
      },
      "NAME": {
         "default": "byte",
         "title": "Name",
         "type": "string"
      },
      "MIGRATION_CONFIG": {
         "default": "/home/runner/work/byte/byte/src/server/lib/db/alembic.ini",
         "title": "Migration Config",
         "type": "string"
      },
      "MIGRATION_PATH": {
         "default": "/home/runner/work/byte/byte/src/server/lib/db/migrations",
         "title": "Migration Path",
         "type": "string"
      },
      "MIGRATION_DDL_VERSION_TABLE": {
         "default": "ddl_version",
         "title": "Migration Ddl Version Table",
         "type": "string"
      }
   }
}

Config:
  • extra: str = ignore

  • env_prefix: str = DB_

  • env_file: str = .env

  • env_file_encoding: str = utf-8

Fields:
model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

field ECHO: bool = False

Enable SQLAlchemy engine logs.

field ECHO_POOL: bool | Literal['debug'] = False

Enable SQLAlchemy connection pool logs.

field POOL_DISABLE: bool = True

Disable SQLAlchemy pooling, same as setting pool to.

See NullPool.

field POOL_MAX_OVERFLOW: int = 10

See QueuePool.

Warning

This is arguably pretty high, and shouldn’t be raised past 10.

field POOL_SIZE: int = 5

See QueuePool.

field POOL_TIMEOUT: int = 30

See QueuePool.

field POOL_RECYCLE: int = 300

See QueuePool.

field POOL_PRE_PING: bool = False

See QueuePool.

field CONNECT_ARGS: dict[str, Any] = {}

Connection arguments to pass to the database driver.

field URL: str = 'postgresql+asyncpg://byte:bot@localhost:5432/byte'

Database connection URL.

field ENGINE: str | None = None

Database engine.

field USER: str = 'byte'

Database user.

field PASSWORD: str = 'bot'

Database password.

field HOST: str = 'localhost'

Database host.

field PORT: int = 5432

Database port.

field NAME: str = 'byte'

Database name.

field MIGRATION_CONFIG: str = '/home/runner/work/byte/byte/src/server/lib/db/alembic.ini'

Path to Alembic config file.

field MIGRATION_PATH: str = '/home/runner/work/byte/byte/src/server/lib/db/migrations'

Path to Alembic migration files.

field MIGRATION_DDL_VERSION_TABLE: str = 'ddl_version'

Name of the table used to track DDL version.

pydantic settings src.server.lib.settings.GitHubSettings[source]

Bases: BaseSettings

Configures GitHub app for the project.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Show JSON schema
{
   "title": "GitHubSettings",
   "description": "Configures GitHub app for the project.",
   "type": "object",
   "properties": {
      "NAME": {
         "default": "byte-bot-app",
         "title": "Name",
         "type": "string"
      },
      "APP_ID": {
         "default": 480575,
         "title": "App Id",
         "type": "integer"
      },
      "APP_PRIVATE_KEY": {
         "default": "",
         "title": "App Private Key",
         "type": "string"
      },
      "APP_CLIENT_ID": {
         "default": "Iv1.c3a5214c6642dedd",
         "title": "App Client Id",
         "type": "string"
      },
      "APP_CLIENT_SECRET": {
         "default": "",
         "title": "App Client Secret",
         "type": "string"
      },
      "REDIRECT_URL": {
         "default": "http://127.0.0.1:3000/github/session",
         "title": "Redirect Url",
         "type": "string"
      },
      "PERSONAL_ACCESS_TOKEN": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Personal Access Token"
      }
   }
}

Config:
  • extra: str = ignore

  • case_sensitive: bool = True

  • env_prefix: str = GITHUB_

  • env_file: str = .env

Fields:
Validators:
model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

field NAME: str = 'byte-bot-app'

GitHub App name.

field APP_ID: int = 480575

GitHub App ID.

field APP_PRIVATE_KEY: str = ''

GitHub App private key.

Validated by:
field APP_CLIENT_ID: str = 'Iv1.c3a5214c6642dedd'

GitHub App client ID.

field APP_CLIENT_SECRET: str = ''

GitHub App client secret.

field REDIRECT_URL: str = 'http://127.0.0.1:3000/github/session'

GitHub App redirect URL.

field PERSONAL_ACCESS_TOKEN: str | None = None

GitHub personal access token.

validator validate_and_load_private_key  »  APP_PRIVATE_KEY[source]

Validates and loads the GitHub App private key.

Parameters:

value – The value of the APP_PRIVATE_KEY setting.

Returns:

The validated and loaded GitHub App private key.

pydantic settings src.server.lib.settings.LogSettings[source]

Bases: BaseSettings

Logging config for the Project.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Show JSON schema
{
   "title": "LogSettings",
   "description": "Logging config for the Project.",
   "type": "object",
   "properties": {
      "EXCLUDE_PATHS": {
         "default": "\\A(?!x)x",
         "title": "Exclude Paths",
         "type": "string"
      },
      "HTTP_EVENT": {
         "default": "HTTP",
         "title": "Http Event",
         "type": "string"
      },
      "INCLUDE_COMPRESSED_BODY": {
         "default": false,
         "title": "Include Compressed Body",
         "type": "boolean"
      },
      "LEVEL": {
         "default": 20,
         "title": "Level",
         "type": "integer"
      },
      "OBFUSCATE_COOKIES": {
         "default": [
            "session"
         ],
         "items": {
            "type": "string"
         },
         "title": "Obfuscate Cookies",
         "type": "array",
         "uniqueItems": true
      },
      "OBFUSCATE_HEADERS": {
         "default": [
            "X-API-KEY",
            "Authorization"
         ],
         "items": {
            "type": "string"
         },
         "title": "Obfuscate Headers",
         "type": "array",
         "uniqueItems": true
      },
      "JOB_FIELDS": {
         "default": [
            "function",
            "kwargs",
            "key",
            "scheduled",
            "attempts",
            "completed",
            "queued",
            "started",
            "result",
            "error"
         ],
         "items": {
            "type": "string"
         },
         "title": "Job Fields",
         "type": "array"
      },
      "REQUEST_FIELDS": {
         "default": [
            "path",
            "method",
            "headers",
            "cookies",
            "query",
            "path_params",
            "body"
         ],
         "items": {
            "enum": [
               "path",
               "method",
               "content_type",
               "headers",
               "cookies",
               "query",
               "path_params",
               "body",
               "scheme",
               "client"
            ],
            "type": "string"
         },
         "title": "Request Fields",
         "type": "array"
      },
      "RESPONSE_FIELDS": {
         "default": [
            "status_code",
            "cookies",
            "headers"
         ],
         "items": {
            "enum": [
               "status_code",
               "headers",
               "body",
               "cookies"
            ],
            "type": "string"
         },
         "title": "Response Fields",
         "type": "array"
      },
      "UVICORN_ACCESS_LEVEL": {
         "default": 30,
         "title": "Uvicorn Access Level",
         "type": "integer"
      },
      "UVICORN_ERROR_LEVEL": {
         "default": 20,
         "title": "Uvicorn Error Level",
         "type": "integer"
      }
   }
}

Config:
  • extra: str = ignore

  • case_sensitive: bool = True

  • env_prefix: str = LOG_

  • env_file: str = .env

Fields:
field EXCLUDE_PATHS: str = '\\A(?!x)x'

Regex to exclude paths from logging.

field HTTP_EVENT: str = 'HTTP'

Log event name for logs from litestar handlers.

field INCLUDE_COMPRESSED_BODY: bool = False

Include body of compressed responses in log output.

field LEVEL: int = 20

Stdlib log levels.

Only emit logs at this level, or higher.

field OBFUSCATE_COOKIES: set[str] = {'session'}

Request cookie keys to obfuscate.

field OBFUSCATE_HEADERS: set[str] = {'Authorization', 'X-API-KEY'}

Request header keys to obfuscate.

field JOB_FIELDS: list[str] = ['function', 'kwargs', 'key', 'scheduled', 'attempts', 'completed', 'queued', 'started', 'result', 'error']

Attributes of the SAQ Job to be logged.

field REQUEST_FIELDS: list[RequestExtractorField] = ['path', 'method', 'headers', 'cookies', 'query', 'path_params', 'body']

Attributes of the Request to be logged.

field RESPONSE_FIELDS: list[ResponseExtractorField] = ['status_code', 'cookies', 'headers']

Attributes of the Response to be logged.

field UVICORN_ACCESS_LEVEL: int = 30

Level to log uvicorn access logs.

field UVICORN_ERROR_LEVEL: int = 20

Level to log uvicorn error logs.

model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

pydantic settings src.server.lib.settings.OpenAPISettings[source]

Bases: BaseSettings

Configures OpenAPI for the Project.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Show JSON schema
{
   "title": "OpenAPISettings",
   "description": "Configures OpenAPI for the Project.",
   "type": "object",
   "properties": {
      "CONTACT_NAME": {
         "default": "Admin",
         "title": "Contact Name",
         "type": "string"
      },
      "CONTACT_EMAIL": {
         "default": "hello@byte-bot.app",
         "title": "Contact Email",
         "type": "string"
      },
      "TITLE": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": "Byte Bot",
         "title": "Title"
      },
      "VERSION": {
         "default": "0.2.0",
         "title": "Version",
         "type": "string"
      },
      "PATH": {
         "default": "/api",
         "title": "Path",
         "type": "string"
      },
      "DESCRIPTION": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": "The Byte Bot API supports the Byte Discord bot.\n                                  You can find out more about this project in the\n                                  [docs](https://docs.byte-bot.app/latest).",
         "title": "Description"
      },
      "SERVERS": {
         "default": [],
         "items": {
            "additionalProperties": {
               "type": "string"
            },
            "type": "object"
         },
         "title": "Servers",
         "type": "array"
      },
      "EXTERNAL_DOCS": {
         "anyOf": [
            {
               "additionalProperties": {
                  "type": "string"
               },
               "type": "object"
            },
            {
               "type": "null"
            }
         ],
         "default": {
            "description": "Byte Bot API Docs",
            "url": "https://docs.byte-bot.app/latest"
         },
         "title": "External Docs"
      }
   }
}

Config:
  • extra: str = ignore

  • case_sensitive: bool = True

  • env_prefix: str = OPENAPI_

  • env_file: str = .env

Fields:
Validators:
field CONTACT_NAME: str = 'Admin'

Name of contact on document.

field CONTACT_EMAIL: str = 'hello@byte-bot.app'

Email for contact on document.

field TITLE: str | None = 'Byte Bot'

Document title.

field VERSION: str = '0.2.0'

Document version.

field PATH: str = '/api'

Path to access the root API documentation.

field DESCRIPTION: str | None = 'The Byte Bot API supports the Byte Discord bot.\n                                  You can find out more about this project in the\n                                  [docs](https://docs.byte-bot.app/latest).'
model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

field SERVERS: list[dict[str, str]] = []

Servers to use for the OpenAPI documentation.

Validated by:
field EXTERNAL_DOCS: dict[str, str] | None = {'description': 'Byte Bot API Docs', 'url': 'https://docs.byte-bot.app/latest'}

External documentation for the API.

validator assemble_openapi_servers  »  SERVERS[source]

Assembles the OpenAPI servers based on the environment.

Parameters:

value – The value of the SERVERS setting.

Returns:

The assembled OpenAPI servers.

pydantic settings src.server.lib.settings.ProjectSettings[source]

Bases: BaseSettings

Project Settings.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Show JSON schema
{
   "title": "ProjectSettings",
   "description": "Project Settings.",
   "type": "object",
   "properties": {
      "BUILD_NUMBER": {
         "default": "",
         "title": "Build Number",
         "type": "string"
      },
      "CHECK_DB_READY": {
         "default": true,
         "title": "Check Db Ready",
         "type": "boolean"
      },
      "CHECK_REDIS_READY": {
         "default": true,
         "title": "Check Redis Ready",
         "type": "boolean"
      },
      "DEBUG": {
         "default": false,
         "title": "Debug",
         "type": "boolean"
      },
      "ENVIRONMENT": {
         "default": "prod",
         "title": "Environment",
         "type": "string"
      },
      "TEST_ENVIRONMENT_NAME": {
         "default": "test",
         "title": "Test Environment Name",
         "type": "string"
      },
      "LOCAL_ENVIRONMENT_NAME": {
         "default": "local",
         "title": "Local Environment Name",
         "type": "string"
      },
      "NAME": {
         "default": "Byte Bot",
         "title": "Name",
         "type": "string"
      },
      "SECRET_KEY": {
         "format": "password",
         "title": "Secret Key",
         "type": "string",
         "writeOnly": true
      },
      "JWT_ENCRYPTION_ALGORITHM": {
         "default": "HS256",
         "title": "Jwt Encryption Algorithm",
         "type": "string"
      },
      "BACKEND_CORS_ORIGINS": {
         "default": [
            "*"
         ],
         "items": {
            "type": "string"
         },
         "title": "Backend Cors Origins",
         "type": "array"
      },
      "STATIC_URL": {
         "default": "/static/",
         "title": "Static Url",
         "type": "string"
      },
      "CSRF_COOKIE_NAME": {
         "default": "csrftoken",
         "title": "Csrf Cookie Name",
         "type": "string"
      },
      "CSRF_COOKIE_SECURE": {
         "default": false,
         "title": "Csrf Cookie Secure",
         "type": "boolean"
      },
      "STATIC_DIR": {
         "default": "/home/runner/work/byte/byte/src/server/domain/web/resources",
         "format": "path",
         "title": "Static Dir",
         "type": "string"
      },
      "DEV_MODE": {
         "default": false,
         "title": "Dev Mode",
         "type": "boolean"
      }
   },
   "required": [
      "SECRET_KEY"
   ]
}

Config:
  • extra: str = ignore

  • case_sensitive: bool = True

  • env_file: str = .env

Fields:
Validators:
field BUILD_NUMBER: str = ''

Identifier for CI build.

field CHECK_DB_READY: bool = True

Check for database readiness on startup.

field CHECK_REDIS_READY: bool = True

Check for redis readiness on startup.

field DEBUG: bool = False

Run Litestar with debug=True.

field ENVIRONMENT: str = 'prod'

dev, prod, qa, etc.

field TEST_ENVIRONMENT_NAME: str = 'test'

Value of ENVIRONMENT used to determine if running tests.

This should be the value of ENVIRONMENT in tests.env.

field LOCAL_ENVIRONMENT_NAME: str = 'local'

Value of ENVIRONMENT used to determine if running in local development mode.

This should be the value of ENVIRONMENT in your local .env file.

field NAME: str = 'Byte Bot'

Application name.

field SECRET_KEY: SecretBytes [Required]

Secret key used for signing cookies and other things.

Validated by:
field JWT_ENCRYPTION_ALGORITHM: str = 'HS256'

Algorithm used to encrypt JWTs.

field BACKEND_CORS_ORIGINS: list[str] = ['*']

List of origins allowed to access the API.

Validated by:
field STATIC_URL: str = '/static/'

Default URL where static assets are located.

Name of the CSRF cookie.

Set the CSRF cookie to be secure.

field STATIC_DIR: Path = PosixPath('/home/runner/work/byte/byte/src/server/domain/web/resources')

Path to static assets.

field DEV_MODE: bool = False

Indicate if running in development mode.

property slug: str

Return a slugified name.

Returns:

self.NAME, all lowercase and hyphens instead of spaces.

validator assemble_cors_origins  »  BACKEND_CORS_ORIGINS[source]

Parse a list of origins.

Parameters:

value – A comma-separated string of origins, or a list of origins.

Returns:

A list of origins.

Raises:

ValueError – If value is not a list or string.

validator generate_secret_key  »  SECRET_KEY[source]

Generate a secret key.

Parameters:

value – A secret key, or None.

Returns:

A secret key.

model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

pydantic settings src.server.lib.settings.ServerSettings[source]

Bases: BaseSettings

Server configurations.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Show JSON schema
{
   "title": "ServerSettings",
   "description": "Server configurations.",
   "type": "object",
   "properties": {
      "APP_LOC": {
         "default": "src.app:create_app",
         "title": "App Loc",
         "type": "string"
      },
      "APP_LOC_IS_FACTORY": {
         "default": true,
         "title": "App Loc Is Factory",
         "type": "boolean"
      },
      "HOST": {
         "default": "localhost",
         "title": "Host",
         "type": "string"
      },
      "KEEPALIVE": {
         "default": 65,
         "title": "Keepalive",
         "type": "integer"
      },
      "PORT": {
         "default": 8000,
         "title": "Port",
         "type": "integer"
      },
      "RELOAD": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": false,
         "title": "Reload"
      },
      "RELOAD_DIRS": {
         "default": [
            "/home/runner/work/byte/byte/src"
         ],
         "items": {
            "type": "string"
         },
         "title": "Reload Dirs",
         "type": "array"
      },
      "HTTP_WORKERS": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Http Workers"
      }
   }
}

Config:
  • extra: str = ignore

  • case_sensitive: bool = True

  • env_prefix: str = SERVER_

  • env_file: str = .env

Fields:
field APP_LOC: str = 'src.app:create_app'

Path to app executable, or factory.

field APP_LOC_IS_FACTORY: bool = True

Indicate if APP_LOC points to an executable or factory.

field HOST: str = 'localhost'

Server network host.

field KEEPALIVE: int = 65

Seconds to hold connections open.

field PORT: int = 8000

Server port.

field RELOAD: bool | None = False

Turn on hot reloading.

field RELOAD_DIRS: list[str] = ['/home/runner/work/byte/byte/src']

Directories to watch for reloading.

Warning

This only accepts a single directory for now, something is broken

field HTTP_WORKERS: int | None = None

Number of HTTP Worker processes to be spawned by Uvicorn.

model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

pydantic settings src.server.lib.settings.TemplateSettings[source]

Bases: BaseSettings

Configures Templating for the project.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Show JSON schema
{
   "title": "TemplateSettings",
   "description": "Configures Templating for the project.",
   "type": "object",
   "properties": {
      "ENGINE": {
         "title": "Engine"
      }
   }
}

Config:
  • extra: str = ignore

  • case_sensitive: bool = True

  • env_prefix: str = TEMPLATE_

  • env_file: str = .env

Fields:
model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

field ENGINE: type[JinjaTemplateEngine] = <class 'litestar.contrib.jinja.JinjaTemplateEngine'>

Template engine to use. (Jinja2 or Mako)

src.server.lib.settings.load_settings() tuple[ProjectSettings, APISettings, OpenAPISettings, TemplateSettings, ServerSettings, LogSettings, DatabaseSettings, GitHubSettings][source]

Load Settings file.

Returns:

application settings

Return type:

Settings