dom_toml
¶
Source code: dom_toml/__init__.py
Dom’s tools for Tom’s Obvious, Minimal Language.
Data:
Invariant |
Functions:
|
Writes out |
|
Convert |
|
Parse TOML from the given file. |
|
Parse the given string as TOML. |
-
_M
= TypeVar(_M, bound=typing.MutableMapping[str, typing.Any])¶ Type:
TypeVar
Invariant
TypeVar
bound totyping.MutableMapping
[str
,typing.Any
].
-
dump
(data, filename, encoder=<class 'TomlEncoder'>)[source]¶ Writes out
data
as TOML to the given file.- Parameters
- Return type
- Returns
A string containing the
TOML
corresponding todata
.
Changed in version 0.5.0: The default value for
encoder
changed fromNone
totoml.TomlEncoder
Explicitly passingencoder=None
is deprecated and support will be removed in 1.0.0
-
dumps
(data, encoder=<class 'TomlEncoder'>)[source]¶ Convert
data
to a TOML string.- Parameters
- Return type
- Returns
A string containing the
TOML
corresponding todata
.
Changed in version 0.5.0: The default value for
encoder
changed fromNone
totoml.TomlEncoder
Explicitly passingencoder=None
is deprecated and support will be removed in 1.0.0
-
load
(filename, dict_=<class 'dict'>, decoder=<class 'TomlDecoder'>)[source]¶ Parse TOML from the given file.
- Parameters
- Return type
- Returns
A mapping containing the
TOML
data.- Overloads