Skip to main content

Deltaman - Parsing human time intervals

pip install deltaman

Getting Started

from deltaman import delta_parser

for delta in ("15s", "3min", "1h15m", "1 day 12 hours", "1m-15s"):
    parsed = delta_parser.parse(delta)
    print(f'{delta!r:20s} {parsed!r:20s}')

That outputs

'15s'                datetime.timedelta(seconds=15)
'3min'               datetime.timedelta(seconds=180)
'1h15m'              datetime.timedelta(seconds=4500)
'1 day 12 hours'     datetime.timedelta(days=1, seconds=43200)
'1m-15s'             datetime.timedelta(seconds=45)

Note you can get more examples from the testing files.

Testing

$ pytest

Or

$ tox

Metadata

Release files for deltaman 0.0.4

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

Source distribution (sdist)

Source distribution for deltaman 0.0.4
File Size Uploaded Provenance Actions
deltaman-0.0.4.tar.gz 27.1 kB Without provenance Details for deltaman-0.0.4.tar.gz

Built distribution (wheel)

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

Total release size: 54.5 kB

Release files / deltaman-0.0.4.tar.gz

Download URL deltaman-0.0.4.tar.gz
Size 27.1 kB
Tags Source
SHA-256 checksum
How to use checksums
0a2ec2f95bdef58f080d237fd10dd103ade5770d0955acbfd38616452eadc840
BLAKE2b-256 checksum
How to use checksums
647402648becdab039d8b03ab5ef8384f4714b81d7f969d54bb34e634c65c844
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.0 CPython/3.8.12 Linux/5.13.0-1031-azure

Release files / deltaman-0.0.4-py3-none-any.whl

Download URL deltaman-0.0.4-py3-none-any.whl
Size 27.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
627fdb72d610132e045353d0ccfcca06244845a44a733bc27a9cf3d5a37f5a26
BLAKE2b-256 checksum
How to use checksums
9acfc25a20ee1c81db633da02e7c194ff0304dd82d2f47f9dd164137ff98782e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.0 CPython/3.8.12 Linux/5.13.0-1031-azure

Security for deltaman 0.0.4

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