Parse Relative Time

pip install pytimeparse

from pytimeparse import parse

if __name__ == "__main__":
    # Example usage
    seconds_in_day = parse('1 day')
    print(seconds_in_day)

    seconds_in_six_hours = parse('6 hours')
    print(seconds_in_six_hours)