> 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/toml/functions/maci.tomldumpstr.md).

# maci.tomldumpstr

### dumping a string

Dumps a dictionary to a string formatted as TOML.&#x20;

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

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

```python
toml_string = maci.tomldumpstr(data)
```

In this example, we simply dump data to a string formatted as toml using the tomldumpstr function and pass dictionary 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:  dict[str, Any]</summary>

First and only required positional argument. Accepts dictionaries

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

</details>

<details>

<summary>multi_line_str:  bool</summary>

Optional parameter. Accepts booleans. Default = False

Use this parameter to enable writing string values as a multiline string. Default behavior is disabled matching the default for the tomli-w library.

</details>

*This function uses the tomli-w library installed as a dependency from pypi as its underlying functionality. For more information on tomli-w, visit:* [*https://pypi.org/project/tomli-w/*](https://pypi.org/project/tomli-w/)
