--- id: aniso8601 version: "10.0.1" license: unclear license_treatment: permissive maintenance: aging --- # aniso8601 — A library for parsing ISO 8601 strings. License: permissive · Maintenance: aging · Downloads: 9.3M/mo ## What it is and what it does aniso8601 is a pure-Python ISO 8601 parser that converts ISO 8601 formatted strings into standard Python datetime objects. It handles dates, times, datetimes with timezone offsets, durations, and repeating intervals, returning them as datetime.date, datetime.time, datetime.datetime, datetime.timedelta, or generator objects respectively. The parser supports both extended format (with hyphens and colons) and basic format (compact), reduced accuracy (e.g., hour or minute precision), decimal fractions on the lowest time element, and UTC offsets represented as fixed-offset tzinfo. The package has no external runtime dependencies and installs as a pure-Python wheel. It was last released 483 days ago and is classified as aging in maintenance status, though it remains in Production/Stable development status. The documentation notes that for basic ISO 8601 parsing, Python's built-in datetime.datetime.fromisoformat, datetime.date.fromisoformat, and datetime.time.fromisoformat (available in modern Python versions) may be sufficient for simpler use cases. Use it for: - Parse ISO 8601 datetime strings from APIs or data feeds into Python datetime objects with timezone awareness. - Convert ISO 8601 duration strings (e.g., 'P1Y2M3DT4H54M6S') into timedelta objects for time arithmetic. - Handle ISO 8601 week dates and ordinal dates that are not supported by Python's built-in fromisoformat. - Generate repeating intervals from ISO 8601 repeat syntax by obtaining a generator of datetime objects. - Determine the resolution (year, month, day, hour, minute, second) of an ISO 8601 string for validation or logging. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Parses ISO 8601 date, time, datetime, duration, and interval strings into Python datetime objects and timedeltas. Yes, if you need to parse ISO 8601 formats beyond what Python's built-in datetime.fromisoformat supports (e.g., week dates, ordinal dates, durations, repeating intervals, or custom delimiters). The package has no dependencies, installs easily, and carries no known vulnerabilities. However, if you only need basic ISO 8601 datetime parsing, Python's standard library may be sufficient and more actively maintained. The aging maintenance status means slower issue response, but the stable API and lack of recent vulnerabilities suggest it is reliable for its narrow, well-defined purpose. ## Install pip install aniso8601 uv add aniso8601 poetry add aniso8601 ## Installing aniso8601 Before you install: Low install friction with no runtime dependencies. Last release was 483 days ago; maintenance status is aging, so expect slower response to issues but no immediate concern for a stable, mature parser. License in practice: Permissive license (BSD) means you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions. Quickstart: pip install aniso8601 import aniso8601 dt = aniso8601.parse_datetime('1977-06-10T12:00:00Z') date = aniso8601.parse_date('1984-04-23') time = aniso8601.parse_time('11:31:14') duration = aniso8601.parse_duration('P1Y2M3DT4H54M6S') Leap seconds (second value 60) are not supported and will raise LeapSecondError. Verify before relying: - Whether datetime.datetime.fromisoformat (built-in since Python 3.7) covers your use case better than aniso8601 for basic ISO 8601 parsing. - Performance characteristics for very large volumes of parsing operations. - Whether custom builder support for alternative datetime representations is actively maintained. ## Package facts - License: not declared (permissive) - Python support: unspecified - Install friction: low - Maintenance: aging - Downloads: 9.3M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags ISO 8601 parser, parse ISO datetime strings, ISO date time parsing, ISO 8601 duration parser, datetime string parsing, ISO interval parsing, timezone-aware datetime parsing, datetime-parsing, iso-8601 [View on SkillFed](https://skillfed.io/packages/aniso8601) · [View on PyPI](https://pypi.org/project/aniso8601/)