# Buildsheet autogenerated by ravenadm tool -- Do not edit. NAMEBASE= python-aniso8601 VERSION= 9.0.1 KEYWORDS= python VARIANTS= v11 v12 SDESC[v11]= Library for parsing ISO 8601 strings (3.11) SDESC[v12]= Library for parsing ISO 8601 strings (3.12) HOMEPAGE= https://bitbucket.org/nielsenb/aniso8601 CONTACT= Python_Automaton[python@ironwolf.systems] DOWNLOAD_GROUPS= main SITES[main]= PYPIWHL/e3/04/e97c12dc034791d7b504860acfcdd2963fa21ae61eaca1c9d31245f812c3 DISTFILE[1]= aniso8601-9.0.1-py2.py3-none-any.whl:main DF_INDEX= 1 SPKGS[v11]= single SPKGS[v12]= single OPTIONS_AVAILABLE= PY311 PY312 OPTIONS_STANDARD= none VOPTS[v11]= PY311=ON PY312=OFF VOPTS[v12]= PY311=OFF PY312=ON DISTNAME= aniso8601-9.0.1.dist-info GENERATED= yes [PY311].USES_ON= python:v11,wheel [PY312].USES_ON= python:v12,wheel [FILE:3323:descriptions/desc.single] aniso8601 ========= Another ISO 8601 parser for Python ---------------------------------- Features ======== * Pure Python implementation * Logical behavior - Parse a time, get a `datetime.time `_ - Parse a date, get a `datetime.date `_ - Parse a datetime, get a `datetime.datetime `_ - Parse a duration, get a `datetime.timedelta `_ - Parse an interval, get a tuple of dates or datetimes - Parse a repeating interval, get a date or datetime [generator] * UTC offset represented as fixed-offset tzinfo * Parser separate from representation, allowing parsing to different datetime representations (see `Builders`_) * No regular expressions Installation ============ The recommended installation method is to use pip:: $ pip install aniso8601 Alternatively, you can download the source (git repository hosted at [Bitbucket]) and install directly:: $ python setup.py install Use === Parsing datetimes ----------------- *Consider* `datetime.datetime.fromisoformat `_ *for basic ISO 8601 datetime parsing* To parse a typical ISO 8601 datetime string:: >>> import aniso8601 >>> aniso8601.parse_datetime('1977-06-10T12:00:00Z') datetime.datetime(1977, 6, 10, 12, 0, tzinfo=+0:00:00 UTC) Alternative delimiters can be specified, for example, a space:: >>> aniso8601.parse_datetime('1977-06-10 12:00:00Z', delimiter=' ') datetime.datetime(1977, 6, 10, 12, 0, tzinfo=+0:00:00 UTC) UTC offsets are supported:: >>> aniso8601.parse_datetime('1979-06-05T08:00:00-08:00') datetime.datetime(1979, 6, 5, 8, 0, tzinfo=-8:00:00 UTC) If a UTC offset is not specified, the returned datetime will be naive:: >>> aniso8601.parse_datetime('1983-01-22T08:00:00') datetime.datetime(1983, 1, 22, 8, 0) Leap seconds are currently not supported and attempting to parse one raises a :code:`LeapSecondError`:: >>> aniso8601.parse_datetime('2018-03-06T23:59:60') Traceback (most recent call last): File "", line 1, in File "/home/nielsenb/Jetfuse/aniso8601/aniso8601/aniso8601/time.py", line 196, in parse_datetime return builder.build_datetime(datepart, timepart) File "/home/nielsenb/Jetfuse/aniso8601/aniso8601/aniso8601/builders/python.py", line 237, in build_datetime cls._build_object(time)) File "/home/nielsenb/Jetfuse/aniso8601/aniso8601/aniso8601/builders/__init__.py", line 336, in _build_object return cls.build_time(hh=parsetuple.hh, mm=parsetuple.mm, File "/home/nielsenb/Jetfuse/aniso8601/aniso8601/aniso8601/builders/python.py", line 191, in build_time hh, mm, ss, tz = cls.range_check_time(hh, mm, ss, tz) File "/home/nielsenb/Jetfuse/aniso8601/aniso8601/aniso8601/builders/__init__.py", line 266, in range_check_time raise LeapSecondError('Leap seconds are not supported.') aniso8601.exceptions.LeapSecondError: Leap seconds are not supported. To get the resolution of an ISO 8601 datetime string:: >>> aniso8601.get_datetime_resolution('1977-06-10T12:00:00Z') == [FILE:115:distinfo] 1d2b7ef82963909e93c4f24ce48d4de9e66009a21bf1c1e1c85bdd0812fe412f 52754 aniso8601-9.0.1-py2.py3-none-any.whl