TOML data reader

TOML data reader reads files whose extension is .toml.

[1]:
from galactic.io.data.core import PopulationFactory
import tempfile
from pprint import pprint

data = """\
# This is a TOML document.
[individual1]
    name="Galois"
    firstname="Évariste"
[individual2]
    name="Wille"
    firstname="Rudolf"
"""

with tempfile.NamedTemporaryFile(mode="w+t", suffix=".toml") as file:
    file.write(data)
    file.seek(0)
    population = PopulationFactory.create(file)
    pprint({key: value for key, value in population.items()})
{'individual1': {'firstname': 'Évariste', 'name': 'Galois'},
 'individual2': {'firstname': 'Rudolf', 'name': 'Wille'}}