iso8601.pyParse utilities for iso8601 encoding | |
Download |
iso8601.py Ranking & Summary
Advertisement
iso8601.py Tags
iso8601.py Description
iso8601.py is a Python module to 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.Synopsisimport iso8601dt = iso8601.parse_datetime("1994-11-05T08:15:30-05:00")Descriptionparse_datetime(string) Parse an iso8601-encoded datetime string. Args: string: an iso8601 datetime string. Returns: A datetime object. Raises: ValueError: Could not parse the provided string.ISO8601_RE Regular expression for an iso8601 encoded date, to be used for validation or manual parsing.InstallationTo install iso8601, make sure you have Python 2.7 or greater installed. Then run this command from the command prompt:python setup.py installIf 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: http://packages.python.org/distribute/easy_install.html#custom-installation-locationsProduct's homepage
iso8601.py Related Software