maci.dump
dumps maci, dict, or object data to a file
dumping a file
Dumps maci, dict, or custom object data to a file. Output in file is structured following the maci language syntax (See language). Nothing is returned. Creates a new or overwrites an existing file by default (See append parameter to change mode)
Basic Example of dumping data to a file using default positional parameters
maci.dump('my.data', data)In this example, we simply dump data to a file using the dump function and pass a string of the filepath to the file as the first argument to the function, then pass the data as the second argument to the function.
Example of dumping MaciDataObj
maci_obj.mydata1 = 'data1'
maci_obj.mydata2 = 2
maci.dump('my.data', maci_obj)Example of dumping dict
dict_data = {'mydata1': 'data1', 'mydata2': 2}
maci.dump('my.data', dict_data)Example of dumping custom object
my_object.mydata1 = 'data1'
my_object.mydata2 = 2
maci.dump('my.data', my_object)Resulted output contents in example file from all object dumps
parameters & arguments
Describes all parameter functionality and accepted data types
Last updated