0.10 - This version may not be safe as it has not been updated for a long time. Find out if your coding project uses this component and get notified of any reported security vulnerabilities with Meterian-X Open Source Security Platform
Maintain your licence declarations and avoid unwanted licences to protect your IP the way you intended.
MIT - MIT LicenseModule for converting between
datetime.timedeltaand Go's Duration strings.
$ pip install durationpyns - nanosecondsus - microsecondsms - milliseconds - secondm - minuteh - hourd - dayw - weekmm - monthy - year# parse
td = durationpy.from_str("4h3m2s1ms")
# format
durationpy.to_str(td)Note: nanosecond precision is lost because datetime.timedelta uses microsecond resolution.