> For the complete documentation index, see [llms.txt](https://docs.macilib.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.macilib.org/docs/yaml/functions/maci.yamldumpstr.md).

# maci.yamldumpstr

### dumping a string

Dumps the corresponding python data types to a string formatted as YAML.&#x20;

{% hint style="info" %}
maci.yamldumpstr  ->  str
{% endhint %}

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

```python
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.&#x20;

### parameters & arguments

Describes all parameter functionality and accepted data types

<details>

<summary>data:  Any</summary>

First and only required positional argument. Accepts Any

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

</details>

*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/*](https://pypi.org/project/PyYAML/)
