maci.yamldumpstr

dumps data to a string as yaml

dumping a string

Dumps the corresponding python data types to a string formatted as YAML.

maci.yamldumpstr -> str

Basic Example of dumping data to a string using default positional parameters

yaml_string = maci.yamldumpstr(data)

In this example, we simply dump data to a string formatted as yaml using the yamldumpstr function and pass the data as an argument to the function, and assign the returned data to a variable.

parameters & arguments

Describes all parameter functionality and accepted data types

data: Any

First and only required positional argument. Accepts Any

Use this parameter to pass in the data you want to dump to a string.

This function uses the PyYAML framework installed as a dependency from pypi for its underlying functionality. It is only using the "safe_dump" method, which only supports standard YAML tags and cannot represent an arbitrary Python object. For more information on PyYAML, visit: https://pypi.org/project/PyYAML/

Last updated