skillfed

isoweek

Objects representing a week

isoweek v1.3.3 597.3K downloads/30d#5,836 on PyPI66
Permissive license BSD Abandoned released

What it is and what it does

isoweek provides a lightweight, immutable Week class for working with ISO 8601 week dates. Each Week instance represents a specific week spanning Monday through Sunday, identified by year and week number (1–53). The class supports arithmetic (adding or subtracting weeks), comparison, and conversion to and from dates, ordinals, and ISO string notation (e.g., "2011W08"). It also provides convenience methods to retrieve individual days of the week as date objects.

The package is designed as a thin wrapper around Python's datetime module, offering an interface similar to datetime.date. It handles the ISO 8601 definition of Week 1 (the first week with 4 or more days in January) and automatically adjusts year boundaries when needed. With no external dependencies, it installs easily, but the project has been abandoned since 2017 and receives no maintenance.

Use it for:

  • Parse or generate ISO week strings (e.g., "2011W08") for calendar systems or data interchange.
  • Calculate the Monday and Sunday boundaries of a given week for scheduling or reporting.
  • Perform week-based arithmetic (e.g., find the date 5 weeks from now) without manual date math.
  • Determine which ISO week a given date falls into for weekly aggregation or grouping.
  • Iterate over all weeks in a year for bulk calendar operations or week-by-week reports.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides a Week class representing ISO 8601 weeks (Monday–Sunday) with arithmetic, comparison, and date conversion operations.

Yes, if you need ISO 8601 week handling and can tolerate an unmaintained package. The code is simple and stable—no dependencies, no known vulnerabilities, and it works for basic week arithmetic and conversion. However, do not use it if you require active maintenance, support for modern Python versions beyond what was tested in 2017, or fixes for edge cases that may emerge. For new projects, consider whether Python's built-in datetime module or a maintained alternative better fits your needs.

Install

isoweek on PyPI

pip

pip install isoweek

uv

uv add isoweek

poetry

poetry add isoweek

Installing isoweek

Before you install

No runtime dependencies and a pure-Python wheel distribution keep install friction minimal. However, the package is abandoned—last release was 2017-01-04 and last commit 2020-06-02—so it will not receive bug fixes or maintenance for modern Python versions.

License in practice

BSD license is permissive and poses no significant restriction on commercial or proprietary use.

Quickstart

from isoweek import Week
w = Week(2011, 20)
print(w.monday())
print(Week.thisweek())

Verify before relying

  • Whether the package works reliably with Python 3.10+ despite being abandoned since 2017.
  • Whether edge cases around leap years and year boundaries are handled correctly in modern datetime contexts.

Package facts

License BSD (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance abandoned — 3,509 days since the last release
Last repo commit
First released
Downloads 597,323/month — #5,836 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: isoweek-1.3.3-py2.py3-none-any.whl

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2.6Programming Language :: Python :: 2.7Programming Language :: Python :: 3Topic :: Software Development :: Libraries :: Python Modules

Tags

ISO 8601 week handlingweek arithmetic and comparisonconvert date to ISO weekweekly date rangesweek number calculationsmonday to sunday weeks
date-timeiso-8601

More Python Modules packages