iso8601
Simple module to parse ISO 8601 dates
What it is and what it does
iso8601 is a lightweight, dependency-free parser that converts ISO 8601 formatted date strings into Python datetime objects. It handles the most common ISO 8601 formats—full timestamps with timezones, date-only strings, partial times—and applies sensible defaults (UTC timezone, day/month of 1) when components are omitted. The parser is permissive by design: it accepts space instead of T as a date-time separator, tolerates missing leading zeros in days and months, and lets you override the default timezone.
The package is intentionally minimal. It does one thing: take an ISO 8601 string and return a datetime. If you need richer date manipulation, timezone handling, or parsing of non-ISO formats, the description itself points toward arrow, pendulum, python-dateutil, or Python 3's built-in datetime.fromisoformat(). For straightforward ISO 8601 parsing in legacy codebases or when you want to avoid extra dependencies, iso8601 is a stable, proven choice.
Use it for:
- Parse API response timestamps that come in ISO 8601 format into Python datetime objects for comparison or manipulation.
- Convert log entries with ISO 8601 timestamps into datetime objects for time-based filtering or analysis.
- Handle user-submitted date strings in ISO 8601 format from web forms or data imports.
- Work with database exports or JSON data that use ISO 8601 date representation.
- Normalize mixed date formats by accepting ISO 8601 strings and converting them to a consistent datetime representation.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Parses ISO 8601 date strings (e.g. 2007-01-14T20:34:22+00:00) into Python datetime objects, handling common date/time formats and timezone specifications.
Yes, if you need straightforward ISO 8601 parsing with zero dependencies and don't require advanced date manipulation. The package is stable, permissively licensed, and widely used (top 5000 on PyPI). However, consider Python 3.11+ built-in datetime.fromisoformat() first—it now handles most ISO 8601 cases natively. Install iso8601 only if you need the lenient parsing (space instead of T, missing leading zeros) or must support Python 3.7–3.10.
Install
iso8601 on PyPI
pip
pip install iso8601uv
uv add iso8601poetry
poetry add iso8601Installing iso8601
Before you install
Low install friction with no runtime dependencies. Aging maintenance status (last release 2023-10-03, last commit 2025-03-06) but repository remains active and untested against Python versions below 3.7.
License in practice
MIT license (permissive) means you can use, modify, and distribute this package freely in commercial and open-source projects with minimal restrictions.
Quickstart
pip install iso8601
import iso8601
dt = iso8601.parse_date("2007-01-25T12:00:00Z")
print(dt) # datetime.datetime(2007, 1, 25, 12, 0, tzinfo=<iso8601.Utc>)
Requires Python 3.7 or later (>=3.7,<4.0).
Verify before relying
- Whether the package handles all ISO 8601 edge cases or only the common forms mentioned in the description.
- Performance characteristics when parsing large volumes of date strings.
- Whether the aging maintenance status indicates sufficient stability or signals future compatibility concerns.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.7,<4.0) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | aging — 1,046 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 12,689,190/month — #1,311 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: iso8601-2.1.0-py3-none-any.whl
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
aniso8601Parses ISO 8601 date, time, datetime, duration,…
permissive · top 5,000 on PyPI
arrowArrow provides a simpler, more intuitive API…
permissive · top 1,000 on PyPI
ciso8601Parses ISO 8601 and RFC 3339 date-time strings…
permissive · top 5,000 on PyPI
dateformatParses strings into datetime objects and…
permissive · top 15,000 on PyPI
isodateParses and formats ISO 8601 date, time,…
permissive · top 1,000 on PyPI
metomi-isodatetimeParses and manipulates ISO 8601 date-time…
copyleft · top 15,000 on PyPI
parsedatetimeParses human-readable date and time strings…
permissive · top 1,000 on PyPI
prefixdateParses date strings with partial precision…
permissive · top 5,000 on PyPI
backports-datetime-fromisoformatBackports expanded `datetime.fromisoformat`…
permissive · top 5,000 on PyPI
tonyg-rfc3339Parses and formats RFC 3339 date-time strings…
unclear · top 15,000 on PyPI