๐ Application Programming Interface#
galactic.io.data.toml
module
Class
TOMLDataReader
for reading.toml
file
- class TOMLDataReader#
Bases:
object
TOML
Datareader.Example
>>> from pprint import pprint >>> from galactic.io.data.toml import TOMLDataReader >>> reader = TOMLDataReader() >>> import io >>> text = '''# This is a TOML document. ... [i1] ... firstname="รvariste" ... name="Galois" ... [i2] ... firstname="Rudolf" ... name="Wille" ... ''' >>> data = reader.read(io.StringIO(text)) >>> pprint(data) {'i1': frozendict.frozendict({'firstname': 'รvariste', 'name': 'Galois'}), 'i2': frozendict.frozendict({'firstname': 'Rudolf', 'name': 'Wille'})}