Skip to main content

Parse utilities for iso8601 encoding.

Project description

Parse utilities for iso8601 encoding.

Whereas iso8601 encoding is offered by datetime.isoformat(), the standard library offers no means to decode an iso8601 format datetime into a datetime object. This module just makes up for that deficiency in an unobtrusive way.


import iso8601
dt = iso8601.parse_datetime("1994-11-05T08:15:30-05:00")



Parse an iso8601-encoded datetime string.

string: an iso8601 datetime string.
A datetime object.
ValueError: Could not parse the provided string.
Regular expression for an iso8601 encoded date, to be used for validation or manual parsing.


To install iso8601, make sure you have Python 2.7 or greater installed. Then run this command from the command prompt:

python install

If you’re upgrading from a previous version, you need to remove it first.

Though it is not a requirement, it is highly suggested that you have Distribute installed.

For custom installation locations, please see:


iso8601 is distributed under the LGPLv2.1 license.

Project details

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page