python-dateutil

Powerful extensions to Python's datetime module for parsing, deltas, recurrence, and timezones.

Library
PyPI
v2.9.0.post0
2,637 stars
Apache-2.0 OR BSD-3-Clause

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
73 /100 Good
Development Activity 68
Maintenance 44
Community 80
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
85 /100 Excellent
Architecture 85
Code Quality 85
Innovation 80
Learning Curve 90

python-dateutil is the de facto standard library for anything Python’s built-in datetime module doesn’t handle out of the box. It adds fuzzy natural-language date parsing, calendar-correct relative date arithmetic, RFC 2445 (iCalendar) recurrence rules, and comprehensive timezone resolution against system and Olson tz data. First released in 2003 and now downloaded hundreds of millions of times a week, it underpins countless higher-level libraries (including pandas) that need robust date and time handling.

The package is organized into small, independently importable submodules — parser, relativedelta, rrule, tz, easter, and utils — so consumers pay only for what they use. A strict test suite (including Hypothesis-based property tests and warnings-as-errors CI) and years of careful deprecation handling have made it one of the most trusted low-level building blocks in the Python ecosystem.

What You Get

  • parser.parse() for fuzzy, locale-tolerant parsing of almost any date/time string format into a native datetime
  • relativedelta for calendar-correct arithmetic (e.g. adding a month without manual day-overflow handling)
  • rrule implementing the full iCalendar (RFC 2445) recurrence-rule specification, including recurrence sets and string parsing
  • tz module with tzfile, tzoffset, tzlocal, gettz(), and Windows registry-based timezone support backed by Olson tz data
  • easter() for computing Easter Sunday under Western, Orthodox, or Julian algorithms
  • isoparser for strict, fast ISO-8601 parsing when input format is known and controlled

Common Use Cases

  • Parsing user-submitted or scraped date strings of unknown format into usable datetime objects
  • Computing recurring schedules (billing cycles, reminders, recurring events) via rrule
  • Calendar-aware date math such as “three months from today” or “the last weekday of this month”
  • Resolving and converting between timezones reliably across Linux, macOS, and Windows
  • Backing higher-level data and scheduling libraries that need dependable date/time primitives

Under The Hood

Architecture: dateutil is organized into clearly separated submodules under src/dateutil/ — parser/ (_parser.py holds the core tokenizer and parse() entry point, isoparser.py handles strict ISO-8601 parsing), tz/ (tz.py implements tzfile, tzoffset, tzlocal, tzwin, and gettz() resolution against system/Olson zoneinfo data, backed by _common.py’s shared ambiguity helpers), rrule.py (a single ~1700-line module implementing the iCalendar RFC 2445 recurrence engine), relativedelta.py (the relativedelta/weekday classes for calendar-aware arithmetic), and easter.py/utils.py for narrow utilities. Each submodule is lazily importable via a custom __getattr__ in __init__.py, so consumers pay import cost only for the piece they use.

Tech Stack: A pure-Python package targeting Python 2.7 and 3.3+, with a single runtime dependency on six for Py2/3 compatibility shims — evidence of its long legacy tail. Build tooling is classic setuptools plus setuptools_scm for version derivation from git tags, packaged from a src/ layout. CI spans GitHub Actions and AppVeyor for Windows coverage, with codecov tracking and pre-commit hooks for lint.

Code Quality: Testing is thorough — tests/ mirrors the module layout with dedicated suites for the parser, rrule, tz, relativedelta, easter, and isoparser modules, plus a property/ subdirectory using Hypothesis for property-based testing of parsing and recurrence edge cases. pytest is configured with filterwarnings = error, so any uncaught DeprecationWarning fails the suite — a strict signal of deliberate API stewardship. Deprecated private functions (_timelex, _tzparser, _resultbase) are explicitly wrapped to emit warnings rather than silently removed.

API Design: The public surface is small and memorable — parse(), relativedelta(), rrule(), and tz.gettz() — each usable independently with minimal boilerplate. The tradeoff is a slightly dated surface: parser.parse() accepts loosely-typed kwargs (dayfirst, yearfirst, fuzzy) rather than a structured config object, and the six dependency signals years of Python 2 compatibility baggage. Documentation is comprehensive — a full Sphinx site on Read the Docs plus docs/examples.rst and a dedicated exercises directory — keeping the learning curve shallow despite the API’s age.

Used by 50 apps in this directory

Python
100%
Apache 2.0

Agno

AI Development · Automation · Devops

42,358

Build, run, and manage agent platforms with a full production stack — SDK, runtime, and control plane included.

View details
93
Repo Health
87
Technical
66
Dependency
Built with
Python 100%
Updated 4 days ago
Python
47%
Other

Airbyte

Data Engineering · Developer Tools

22,143

Open-source ELT platform with 600+ connectors for moving data from any source to warehouses, lakes, and AI agents.

View details
95
Repo Health
80
Technical
67
Dependency
Built with
Python 47%
Kotlin 43%
Updated 4 days ago
Python
89%
Apache 2.0

Apache Airflow

Data Engineering

46,995

Define, schedule, and monitor complex data workflows as Python code — with a powerful UI, 80+ provider integrations, and battle-tested scalability across thousands of production deployments.

View details
96
Repo Health
89
Technical
64
Dependency
Built with
Python 89%
Updated 4 days ago
Python
59%
Apache 2.0

argilla

AI Development · Data Engineering

5,125

Collaborate on high-quality AI training data with a self-hosted annotation platform built for LLMs, NLP, and multimodal models.

View details
65
Repo Health
81
Technical
61
Dependency
Built with
Python 59%
Jupyter Notebook 21%
Updated 1 weeks ago
Python
84%
Other

Bugsink

Developer Tools · Monitoring

2,095

Self-hosted error tracking that accepts Sentry SDKs out of the box, so you keep your instrumentation and drop the monthly bill.

View details
84
Repo Health
80
Technical
71
Dependency
Built with
Python 84%
HTML 14%
Updated 1 weeks ago
Python
100%
Apache 2.0

ClearML

Automation · Devops

6,892

Auto-magical MLOps platform that tracks experiments, versions data, orchestrates pipelines, and serves models with just two lines of code.

View details
94
Repo Health
79
Technical
68
Dependency
Built with
Python 100%
Updated 1 weeks ago
C++
68%
Apache 2.0

ClickHouse

Analytics · Data Engineering · Databases

50,116

Open-source column-oriented database that delivers real-time analytical queries on petabyte-scale data with millisecond latency.

View details
95
Repo Health
90
Technical
64
Dependency
Built with
C++ 68%
Python 14%
Updated 4 days ago
TypeScript
84%
Apache 2.0

Continue

AI Code Assistants · AI Development · Automation

36,049

Open-source coding agent for VS Code, JetBrains, and CLI with support for 30+ LLM providers.

View details
73
Repo Health
88
Technical
62
Dependency
Built with
TypeScript 84%
Updated 5 days ago
TypeScript
84%
Apache 2.0

Continue

AI Code Assistants · AI Development · Automation

36,049

Open-source coding agent for VS Code, JetBrains, and CLI with support for 30+ LLM providers.

View details
73
Repo Health
88
Technical
62
Dependency
Built with
TypeScript 84%
Updated 5 days ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers