Utilities
Small helper functions that don't belong to any specific module.
strtobool
Drop-in replacement for distutils.util.strtobool, which was removed in Python 3.13.
from zodiac_core.utils import strtobool
strtobool("true") # True
strtobool("false") # False
strtobool("yes") # True
strtobool("no") # False
zodiac_core.utils.strtobool(val)
Convert a string representation of truth to True or False.
True values are: y, yes, t, true, on, 1 False values are: n, no, f, false, off, 0
Raises ValueError for anything else.
Drop-in replacement for the removed distutils.util.strtobool
(removed in Python 3.13), returning bool instead of int.
Based on: https://github.com/python/cpython/blob/3.11/Lib/distutils/util.py