๐ Application Programming Interface#
galactic.io.data.yaml
module
Class
YAMLDataReader
for reading.yaml
or.yml
file
- class YAMLDataReader#
Bases:
object
YAML
Data reader.Example
>>> from pprint import pprint >>> from galactic.io.data.yaml import YAMLDataReader >>> reader = YAMLDataReader() >>> import io >>> text = '''# This is a YAML document. ... - firstname: รvariste ... name: Galois ... - firstname: Rudolf ... name: Wille ... ''' >>> data = reader.read(io.StringIO(text)) >>> pprint(data) [frozendict.frozendict({'firstname': 'รvariste', 'name': 'Galois'}), frozendict.frozendict({'firstname': 'Rudolf', 'name': 'Wille'})]