api_example.settings package

Submodules

api_example.settings.app_settings module

class HashableBaseSettings(_case_sensitive: bool | None = None, _env_prefix: str | None = None, _env_file: DotenvType | None = PosixPath('.'), _env_file_encoding: str | None = None, _env_ignore_empty: bool | None = None, _env_nested_delimiter: str | None = None, _env_parse_none_str: str | None = None, _secrets_dir: str | Path | None = None)[source]

Bases: BaseSettings

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

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

model_config: ClassVar[SettingsConfigDict] = {'arbitrary_types_allowed': True, 'case_sensitive': False, 'env_file': None, 'env_file_encoding': None, 'env_ignore_empty': False, 'env_nested_delimiter': None, 'env_parse_none_str': None, 'env_prefix': '', 'extra': 'forbid', 'json_file': None, 'json_file_encoding': None, 'protected_namespaces': ('model_', 'settings_'), 'secrets_dir': None, 'toml_file': None, 'validate_default': True, 'yaml_file': None, 'yaml_file_encoding': None}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

class Settings(_case_sensitive: bool | None = None, _env_prefix: str | None = None, _env_file: DotenvType | None = PosixPath('.'), _env_file_encoding: str | None = None, _env_ignore_empty: bool | None = None, _env_nested_delimiter: str | None = None, _env_parse_none_str: str | None = None, _secrets_dir: str | Path | None = None, *, ai_model_external_url: str | Path = PosixPath('/home/runner/work/example-api-template/example-api-template/data/models/model.pickle'), data_loader_module: str | None = '', local_dir: Path = PosixPath('/home/runner/work/example-api-template/example-api-template'), local_temp_dir: Path = PosixPath('/home/runner/work/example-api-template/example-api-template/tmp'), log_level: str = 'DEBUG', svr_host: str = '0.0.0.0', svr_port: int = 80, root_path: str = '/', workers: int = 1)[source]

Bases: HashableBaseSettings

ai_model_external_url: str | Path
data_loader_module: str | None
local_dir: Path
local_temp_dir: Path
log_level: str
svr_host: str
svr_port: int
root_path: str
workers: int
model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}

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

model_config: ClassVar[SettingsConfigDict] = {'arbitrary_types_allowed': True, 'case_sensitive': False, 'env_file': None, 'env_file_encoding': None, 'env_ignore_empty': False, 'env_nested_delimiter': None, 'env_parse_none_str': None, 'env_prefix': '', 'extra': 'forbid', 'json_file': None, 'json_file_encoding': None, 'protected_namespaces': ('model_', 'settings_'), 'secrets_dir': None, 'toml_file': None, 'validate_default': True, 'yaml_file': None, 'yaml_file_encoding': None}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'ai_model_external_url': FieldInfo(annotation=Union[str, Path], required=False, default=PosixPath('/home/runner/work/example-api-template/example-api-template/data/models/model.pickle')), 'data_loader_module': FieldInfo(annotation=Union[str, NoneType], required=False, default=''), 'local_dir': FieldInfo(annotation=Path, required=False, default=PosixPath('/home/runner/work/example-api-template/example-api-template')), 'local_temp_dir': FieldInfo(annotation=Path, required=False, default=PosixPath('/home/runner/work/example-api-template/example-api-template/tmp')), 'log_level': FieldInfo(annotation=str, required=False, default='DEBUG'), 'root_path': FieldInfo(annotation=str, required=False, default='/'), 'svr_host': FieldInfo(annotation=str, required=False, default='0.0.0.0'), 'svr_port': FieldInfo(annotation=int, required=False, default=80), 'workers': FieldInfo(annotation=int, required=False, default=1)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

get_settings() Settings[source]

api_example.settings.args module

parse_args(args: List[str] | None = None) Namespace[source]

api_example.settings.defaults module

Module contents