ordeq_toml
TOML
dataclass
¶
Bases: TOMLInput, Output[dict[str, Any]]
IO class for reading and writing TOML files.
Example usage:
1 2 3 4 5 6 | |
load(**load_options)
¶
Load and parse the TOML file specified by the path attribute.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**load_options
|
Any
|
Additional options to pass to the TOML loader. |
{}
|
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
A dictionary representing the contents of the TOML file. |
save(data, **save_options)
¶
Serialize the given data to a TOML file at the path attribute.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
dict[str, Any]
|
A dictionary to be serialized and saved as a TOML file. |
required |
**save_options
|
Any
|
Additional options to pass to the TOML dumper. |
{}
|
TOMLInput
dataclass
¶
Bases: Input[dict[str, Any]]
IO class for reading TOML files.
Example usage:
1 2 3 4 5 | |
load(**load_options)
¶
Load and parse the TOML file specified by the path attribute.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**load_options
|
Any
|
Additional options to pass to the TOML loader. |
{}
|
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
A dictionary representing the contents of the TOML file. |