iso-week-date
Toolkit to work with str representing ISO Week date format
What it is and what it does
iso-week-date provides classes and utilities to work with ISO Week date formats without the friction of repeatedly converting between strings, date objects, and datetime objects. The core classes—IsoWeek and IsoWeekDate—handle parsing from multiple input types, support arithmetic operations (addition/subtraction with integers), comparison, and range generation. IsoWeek lets you list all dates in a week or fetch the nth day; IsoWeekDate gives you the weekday as an integer and the containing ISO week as a string.
The package also includes optional modules for pandas and polars that convert between datetime series and ISO week strings, plus pydantic integration for validation. A distinctive feature is support for custom offsets—you can shift the week boundary by a timedelta to work with non-standard week definitions. It requires Python 3.10+ and has no mandatory runtime dependencies; pandas, polars, and pydantic are optional.
Use it for:
- Convert a datetime series to ISO week format for reporting or data aggregation in pandas or polars workflows.
- Parse and validate ISO week strings in API payloads or configuration files using pydantic models.
- Perform week-based arithmetic without manual datetime manipulation.
- Check if a given date falls within a specific ISO week using containment operators.
- Work with custom week boundaries by applying a timedelta offset to the standard ISO definition.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Parses and manipulates ISO Week date strings in YYYY-WNN and YYYY-WNN-D formats through dedicated classes, with optional integration for pandas, polars, and pydantic.
Yes. Low install friction, no mandatory dependencies, active maintenance, MIT license, and zero known vulnerabilities make this a safe choice. Install it if you regularly work with ISO week formats or need to integrate week-based logic into pandas, polars pipelines, or pydantic validation.
Install
iso-week-date on PyPI
pip
pip install iso-week-dateuv
uv add iso-week-datepoetry
poetry add iso-week-dateInstalling iso-week-date
Before you install
Low friction: pure Python wheel with no runtime dependencies. Active maintenance with recent release (2026-04-01), last commit 2026-08-01, and support for current Python versions (3.10–3.14).
License in practice
MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions.
Quickstart
pip install iso-week-date
from iso_week_date import IsoWeek, IsoWeekDate
week = IsoWeek.from_string('2023-W01')
week_date = IsoWeekDate.from_string('2023-W01-D')
Requires Python 3.10 or later. Optional: pandas or polars for dataframe utilities; pydantic>=2.40 for validation integration.
Verify before relying
- Performance characteristics when working with large series of ISO week dates.
- Specific behavior of custom offset feature and whether it handles all edge cases correctly.
- Whether the package handles leap weeks and other ISO 8601 edge cases.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 135 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 291,022/month — #7,978 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: iso_week_date-2.3.0-py3-none-any.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
isoweekProvides a Week class representing ISO 8601…
permissive · top 15,000 on PyPI
epiweeksCalculates epidemiological weeks using US CDC…
permissive · top 15,000 on PyPI
isodateParses and formats ISO 8601 date, time,…
permissive · top 1,000 on PyPI
iso8601Parses ISO 8601 date strings (e.g.…
permissive · top 5,000 on PyPI
metomi-isodatetimeParses and manipulates ISO 8601 date-time…
copyleft · top 15,000 on PyPI
deltaParses human-readable duration strings like '1…
permissive · top 15,000 on PyPI
aniso8601Parses ISO 8601 date, time, datetime, duration,…
permissive · top 5,000 on PyPI
isodurationParses and manipulates ISO 8601 duration…
permissive · top 1,000 on PyPI
ciso8601Parses ISO 8601 and RFC 3339 date-time strings…
permissive · top 5,000 on PyPI
dateformatParses strings into datetime objects and…
permissive · top 15,000 on PyPI