parse_str

parse_str(value)[source]

Parses string input values.

Using this function prevents unintentional conversion of objects to strings.

Parameters:

value (Any) – The input value.

Returns:

The input converted to a string.

Return type:

str

Raises:

ValueError – If the input cannot be safely convert to a string, such as lists.