pycql.util

pycql.util.parse_duration(value)

Parses an ISO 8601 duration string into a python timedelta object. Raises a ValueError if a conversion was not possible.

Parameters:value (str) – the ISO8601 duration string to parse
Returns:the parsed duration
Return type:datetime.timedelta