toml ¶
TOML configuration file generator.
Generates TOML configuration files from Pydantic settings models.
Classes:
-
TomlGeneratorSettings–Configuration for TOML generator.
-
TomlGenerator–Generate TOML configuration files.
Classes¶
TomlGeneratorSettings pydantic-model ¶
Bases: BaseModel
Configuration for TOML generator.
Show JSON schema:
JSON
{
"description": "Configuration for TOML generator.\n\nGenerator name: `toml`.",
"properties": {
"paths": {
"description": "Output file paths",
"items": {
"format": "path",
"type": "string"
},
"title": "Paths",
"type": "array"
},
"include_comments": {
"default": true,
"description": "Include field descriptions as comments",
"title": "Include Comments",
"type": "boolean"
}
},
"title": "TomlGeneratorSettings",
"type": "object"
}
Fields:
-
paths(list[Path]) -
include_comments(bool)
TomlGenerator ¶
Bases: AbstractGenerator
Generate TOML configuration files.
Methods:
-
generate_single–Generate TOML format configuration.