pytimeparse
Time expression parser
Decision gist · record as of 2026-08-14
Yes, if you need to parse flexible time expressions. The package is lightweight, dependency-free, permissively licensed, and actively maintained. The gap between the last release (2018) and recent repository activity (2026) suggests it is stable rather than abandoned.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- No runtime dependencies and low install friction.
- Repository remains active with a recent commit in 2026, though the last release was in 2018.
License · maintenance · safety
permissive license (permissive) — MIT license (permissive) means you can use, modify, and distribute the package freely in both open-source and commercial projects with minimal restrictions.
last release 2018-05-18 (3010 days) · last repo commit 2026-07-05 · 299 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 34,236,438 downloads/mo, #761 on PyPI
Alternatives
Verify before relying
from pytimeparse import parse
parse('1.2 minutes')
# Returns: 72
parse('1 day, 14:20:16')
# Returns: 138016- Whether the package works reliably with Python versions released after the classifiers list (which ends at 3.6)
- Whether floating-point precision is sufficient for your use case when parsing decimal time values
What it is and what it does
pytimeparse is a lightweight parser that converts time expressions written in natural language into seconds. It handles a wide variety of formats: shorthand notation (32m, 2h32m, 3d2h32m), colon-separated times (4:13:02), uptime format (2 days, 4:13:02), spelled-out units (5 hours, 34 minutes, 56 seconds), and decimal values (1.2 minutes). The function returns an integer when possible, otherwise a float.
The library has no runtime dependencies, making it simple to integrate into any Python project that needs to parse user-provided or log-based time durations. It's useful anywhere you need to accept flexible time input and convert it to a standard numeric representation for calculations or storage.
Use it for
- Parse timeout or duration values from configuration files or command-line arguments
- Convert uptime logs or system monitoring output into seconds for analysis
- Accept user-friendly time input in web forms or CLI tools and normalize to seconds
- Parse time expressions from log files or system messages for duration calculations
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need to parse flexible time expressions.
The package is lightweight, dependency-free, permissively licensed, and actively maintained. The gap between the last release (2018) and recent repository activity (2026) suggests it is stable rather than abandoned.
Install
pytimeparse on PyPI
Before you install
No runtime dependencies and low install friction. Repository remains active with a recent commit in 2026, though the last release was in 2018.
License in practice
MIT license (permissive) means you can use, modify, and distribute the package freely in both open-source and commercial projects with minimal restrictions.
Quickstart
from pytimeparse import parse
parse('1.2 minutes')
# Returns: 72
parse('1 day, 14:20:16')
# Returns: 138016
Verify before relying
- Whether the package works reliably with Python versions released after the classifiers list (which ends at 3.6)
- Whether floating-point precision is sufficient for your use case when parsing decimal time values
Package facts
| License | permissive license permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 3,010 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 34,236,438 / month, #761 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.2Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Topic :: Text Processing |
Evidence: pytimeparse-1.1.8-py2.py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “parse time expressions”
- pytimeparseParses human-readable time expressions (like '2h32m', '1.2 minutes',…
- pytimeparse2Parses human-readable time expressions (like '2h32m', '1.2 minutes',…
- ctparseParses natural language time expressions (like "May 5th 2:30 in the…
Give your agent the search over MCP, or paste the wish link into any chat.
More Text Processing packages
A drop-in replacement for Python's standard `re` module that adds advanced regex features like nested sets, fuzzy matching, lookaround in conditionals, and full Unicode case-folding while maintaining backward compatibility.
pyparsing provides a library for building text parsers directly in Python code using composable grammar classes, handling quoted strings, whitespace variation, and embedded comments without regex or lex/yacc.
Install it if you need to parse text or define grammars programmatically.
fonttools manipulates font files in multiple formats (TrueType, OpenType, AFM, Type 1, Mac-specific) and includes TTX, a tool to convert fonts to and from XML text format.
Install it if you need to read, write, or manipulate fonts programmatically or via the TTX command-line tool.
Docutils converts plaintext documentation in reStructuredText format into multiple output formats including HTML, XML, and LaTeX using a modular processing system.
RapidFuzz provides fast fuzzy string matching using Levenshtein Distance and related metrics, implemented mostly in C++ with Python bindings for rapid similarity scoring and approximate string matching.
Install it if you need fuzzy string matching; it's a solid replacement for FuzzyWuzzy with better licensing and performance.
tinycss2 parses CSS strings into token and block objects, and generates CSS strings from those objects, following the CSS Syntax Level 3 specification without enforcing specific properties or values.
Install it if your project requires CSS tokenization or syntax manipulation.
See also humanreadable · pytimeparse2 · delta · snaptime · about-time · ago · timeago · uptime · metomi-isodatetime · human-readable