Skip to content

Separated settings support #41

@SerGeRybakov

Description

@SerGeRybakov

If you have a project without a single Config class with the BaseSettings subclasses nested to it as attributes, you have to declare all of them in pyproject.toml as

[tool.pydantic_settings_export]
project_dir = "my_project"
default_settings = [
    "settings:Mongo",
    "settings:Redis",
    "other_settings_module:SomeSettings",
]

etc.

Let the tool scan files and/or directories, e.g.:

[tool.pydantic_settings_export]
project_dir = "my_project"
default_settings = [
    "./settings.py",
    "./different_configs",
]

Metadata

Metadata

Assignees

Labels

Complexity / MComplex to implementfeatureNew feature or enhancement request

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions