dom_toml.decoder


TOML decoders.

New in version 0.2.0.

Classes:

InlineTableDict

Subclass of dict for inline tables.

TomlDecoder()

TOML decoder which uses a dict-subclass for inline tables.

TomlPureDecoder()

TOML decoder which uses pure-Python dictionaries for inline tables.

class InlineTableDict[source]

Bases: dict

Subclass of dict for inline tables.

New in version 2.0.0.

class TomlDecoder[source]

Bases: object

TOML decoder which uses a dict-subclass for inline tables.

New in version 2.0.0.

Methods:

loads(s)

Parse the given string as TOML.

loads(s)[source]

Parse the given string as TOML.

Parameters

s (str)

Return type

Dict[str, Any]

Returns

A mapping containing the TOML data.

class TomlPureDecoder[source]

Bases: TomlDecoder

TOML decoder which uses pure-Python dictionaries for inline tables.

Methods:

loads(s)

Parse the given string as TOML.

loads(s)[source]

Parse the given string as TOML.

Parameters

s (str)

Return type

Dict[str, Any]

Returns

A mapping containing the TOML data.

New in version 2.0.0.