skillfed

iso8601

Simple module to parse ISO 8601 dates

iso8601 v2.1.0 12.7M downloads/30d#1,311 on PyPI35
Permissive license MIT AGING released

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 iso8601

uv

uv add iso8601

poetry

poetry add iso8601

Installing 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

License :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

iso 8601 date parsingparse iso date stringdatetime from iso formatiso 8601 parsertimezone aware date parsingiso date string to datetime
date-parsingiso-8601timezone-aware

More Utilities packages