TOMLIO¶
- class upsilonconf.io.TOMLIO[source]¶
IO for reading/writing TOML files.
Added in version 0.6.0.
- property extensions¶
Collection of extensions that are supported by this IO.
- read_from(**kwargs)¶
Read configuration from a file-like object.
- Parameters:
- streamTextIO
Readable character stream (file-like object).
- Returns:
- configdict
A dictionary representing the configuration in the stream.
- Raises:
- TypeError
If the implementation does not support reading from a stream.
- parse_value(val)[source]¶
Parse string representing a value for a configuration without key.
Added in version 0.8.0.
- Parameters:
- valstr
The string representing the value.
- Returns:
- objany basic type
The value object represented by val.
- write_to(**kwargs)¶
Write configuration to a file-like object.
- Parameters:
- streamTextIO
Writeable character stream (file-like object).
- confMapping
A dictionary representing the configuration to be written.
- Raises:
- TypeError
If the implementation does not support writing to a stream.