Configuration#

pun is configured through a pydantic-settings model. Every field below can be set via an environment variable (or a .env file) named after the field, prefixed with the uppercased project name — for example debug is read from PUN_DEBUG.

The reference below is generated on every docs build directly from the live Settings model (via autodoc-pydantic), so the documented fields, types, defaults, and constraints stay in lockstep with the code and each field’s description=. The rendered config summary reports the model’s env_prefix (PUN_); compose a field’s environment variable by joining that prefix with the uppercased field name as shown above (autodoc-pydantic does not render the fully-qualified per-field names itself).

pydantic settings pun.core.config.Settings[source]

Bases: BaseSettings

Application settings using pydantic-settings.

Settings can be configured via environment variables or .env file. All settings are prefixed with the project name.

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.

Config:
  • extra: str = ignore

  • env_prefix: str = PUN_

  • env_file: str = .env

  • env_file_encoding: str = utf-8

Fields:
field debug: bool = False

Enable debug mode

field log_level: str = 'INFO'

Logging level

field config_dir: Path = PosixPath('/home/runner/.pun')

Configuration directory