Skip to main content

durationpy

Module for converting between datetime.timedelta and Go's Duration strings.

Install

$ pip install durationpy

Parse

  • ns - nanoseconds
  • us - microseconds
  • ms - millisecond
  • s - second
  • m - minute
  • h - hour
  • d - day
  • w - week
  • mm - month
  • y - year
# parse
td = durationpy.from_str("4h3m2s1ms")

# format
durationpy.to_str(td)

Note: nanosecond precision is lost because datetime.timedelta uses microsecond resolution.

Metadata

Release files for durationpy 0.12

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for durationpy 0.12
File Size Uploaded Provenance Actions
durationpy-0.12.tar.gz 3.7 kB Without provenance Details for durationpy-0.12.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for durationpy 0.12
File Interpreter ABI Platform Actions
durationpy-0.12-py3-none-any.whl Python 3 none any Details for durationpy-0.12-py3-none-any.whl

Total release size: 8.0 kB

Release files / durationpy-0.12.tar.gz

Download URL durationpy-0.12.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
03e8223034b4a874c1c0022672aead4e6d7ed792bb418be3c5616f6494eb14cc
BLAKE2b-256 checksum
How to use checksums
5ac2f7e7778c832bddb241ca96fccc711dee013ec2e2ac9ef36e98fc117c48e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.1 {"installer":{"name":"uv","version":"0.11.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / durationpy-0.12-py3-none-any.whl

Download URL durationpy-0.12-py3-none-any.whl
Size 4.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a102cfd01a9881dc2c9c91c061e9ad22953623ddc95c329d837a44e0c335e796
BLAKE2b-256 checksum
How to use checksums
0bed5481140d7cdb857b9c87c3792878fb6fe8997aa454724b376f14895ae99e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.1 {"installer":{"name":"uv","version":"0.11.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for durationpy 0.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page