python-dateutil

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

Library
PyPI
v2.9.0.post0
2,631stars
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 →
54/100Fair
Development Activity16
Maintenance20
Community80
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
85/100Excellent
Architecture85
Code Quality85
Innovation80
Learning Curve90

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 48 apps in this directory

Python
100%
Apache 2.0

Agno

Devops · AI Development · Automation

41,774

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

View details
93
Repo Health
87
Technical
67
Dependency
Built with
Python100%
Updated today
Python
49%
Other

Airbyte

Developer Tools · Data Engineering

21,916

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
Python49%
Kotlin42%
Updated today
Python
90%
Apache 2.0

Apache Airflow

Data Engineering

46,530

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
66
Dependency
Built with
Python90%
Updated today
Python
59%
Apache 2.0

argilla

AI Development · Data Engineering

5,081

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
63
Dependency
Built with
Python59%
Jupyter Notebook21%
Updated 2 days ago
Python
83%
Other

Bugsink

Developer Tools · Monitoring

2,018

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
76
Dependency
Built with
Python83%
HTML15%
Updated 1 weeks ago
Python
100%
Apache 2.0

ClearML

Devops · Automation

6,827

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
69
Dependency
Built with
Python100%
Updated yesterday
C++
69%
Apache 2.0

ClickHouse

Databases · Analytics · Data Engineering

49,325

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
68
Dependency
Built with
C++69%
Python13%
Updated today
TypeScript
84%
Apache 2.0

Continue

Developer Tools · AI Development · AI Code Assistants

35,532

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

View details
87
Repo Health
88
Technical
65
Dependency
Built with
TypeScript84%
Updated today
Go
32%
Apache 2.0

CubeSandbox

Developer Tools · Security · AI Agents

11,247

Instant, concurrent, hardware-isolated MicroVM sandboxes for AI agents — E2B-API compatible, sub-60ms cold starts, and a built-in zero-trust egress proxy, all self-hostable at scale.

View details
83
Repo Health
88
Technical
63
Dependency
Built with
Go32%
Rust31%
C21%
Updated today

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

Search