maci.tomlload

loads toml data from a file

loading a file

Loads toml file data, and returns a dictionary.

maci.tomlload -> dict[str, Any]

Basic Example of loading a toml file using default positional parameter

data = maci.tomlload('mydata.toml')

In this example, we simply load toml data from a file using the tomlload function and pass a string of the filepath to the file as an argument to the function to load the toml data, and assign the returned data to a variable.

parameters & arguments

Describes all parameter functionality and accepted data types

filename: str | Path

First and only required positional argument. Accepts strings and Path objects

Use this parameter to point to your filepath

This function uses the tomli library installed as a dependency from pypi for its underlying functionality. For more information on tomli, visit: https://pypi.org/project/tomli/

Last updated