skillfed

iso-week-date

Toolkit to work with str representing ISO Week date format

iso-week-date v2.3.0 291.0K downloads/30d#7,978 on PyPI10
Permissive license MIT Active released

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-date

uv

uv add iso-week-date

poetry

poetry add iso-week-date

Installing 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

Development Status :: 5 - Production/StableProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Free Threading :: 2 - BetaTopic :: Software Development :: Libraries :: Python ModulesTyping :: Typed

Tags

ISO week date parsingweek format conversionweek number handlingISO week utilitiespandas week date supportpolars week date supportpydantic week validation
date-timedata-validation

More Python Modules packages