isoweek
Objects representing a week
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 isoweekuv
uv add isoweekpoetry
poetry add isoweekInstalling 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
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
epiweeksCalculates epidemiological weeks using US CDC…
permissive · top 15,000 on PyPI
iso-week-dateParses and manipulates ISO Week date strings in…
permissive · top 15,000 on PyPI
metomi-isodatetimeParses and manipulates ISO 8601 date-time…
copyleft · top 15,000 on PyPI
convertdateConverts dates between the Gregorian calendar…
permissive · top 5,000 on PyPI
isodurationParses and manipulates ISO 8601 duration…
permissive · top 1,000 on PyPI
datedeltadatedelta extends Python's datetime module with…
permissive · top 15,000 on PyPI
aniso8601Parses ISO 8601 date, time, datetime, duration,…
permissive · top 5,000 on PyPI
isodateParses and formats ISO 8601 date, time,…
permissive · top 1,000 on PyPI
workalendarWorkalendar provides holiday calendars and…
permissive · top 5,000 on PyPI
iso8601Parses ISO 8601 date strings (e.g.…
permissive · top 5,000 on PyPI