epiweeks
Epidemiological weeks calculation based on CDC and ISO week numbering systems
What it is and what it does
EpiWeeks is a Python package for calculating epidemiological weeks according to two standards: the US CDC's MMWR (Morbidity and Mortality Weekly Report) system and the ISO week numbering system. It provides week-to-date conversions, date-to-week lookups, and iteration over weeks within a year, all validated against CDC reference data. The package is designed for disease surveillance, public health reporting, and epidemiological research where precise week boundaries matter.
The package offers a clean API with Week and Year objects that support comparison, arithmetic (addition and subtraction), and containment checks. It includes full type annotations, comprehensive input validation, and zero runtime dependencies, making it straightforward to integrate into public health applications or data pipelines.
Use it for:
- Generate CDC MMWR week boundaries for disease surveillance reports and epidemiological data aggregation.
- Convert between calendar dates and epidemiological week numbers for public health data analysis.
- Iterate over all weeks in a year to populate surveillance dashboards or export weekly summaries.
- Validate and normalize week-based data from multiple public health sources using a single standard.
- Build time-series analyses aligned to epidemiological weeks rather than calendar months or ISO weeks.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Calculates epidemiological weeks using US CDC (MMWR) and ISO week numbering systems, with validated accuracy against CDC reference data.
Yes. Active maintenance, zero dependencies, permissive license, production-stable status, and validated accuracy against CDC data make this a reliable choice for any epidemiological or public health application that needs precise week calculations. The low install friction and broad Python version support (3.10–3.14) add to its appeal.
Install
epiweeks on PyPI
pip
pip install epiweeksuv
uv add epiweekspoetry
poetry add epiweeksInstalling epiweeks
Before you install
Low friction: pure Python wheel with zero runtime dependencies and active maintenance. Last commit 2026-08-06, production-stable status, supports Python 3.10 through 3.14.
License in practice
MIT license (permissive): you may use, modify, and distribute this package freely in commercial and private projects, with minimal restrictions.
Quickstart
from epiweeks import Week, Year
week = Week(2019, 1)
print(week.enddate())
# 2019-01-05
for week in Year(2019).iterweeks():
print(week.enddate())
Requires Python 3.10 or later.
Verify before relying
- Whether CDC reference validation covers all edge cases or only specific year ranges
- Performance characteristics when iterating large numbers of weeks or years
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 — 219 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 187,718/month — #9,959 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: epiweeks-2.4.0-py3-none-any.whl
Keywords: calendar, cdc, epidemiology, epiweek, iso, mmwr, public health, surveillance
Tags
More Scientific/Engineering packages
NumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
scipyscipy provides numerical algorithms for…
permissive · top 100 on PyPI
scikit-learnscikit-learn provides a comprehensive Python…
permissive · top 1,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
multiprocessMultiprocess is an enhanced fork of Python's…
permissive · top 1,000 on PyPI
isoweekProvides a Week class representing ISO 8601…
permissive · top 15,000 on PyPI
iso-week-dateParses and manipulates ISO Week date strings in…
permissive · top 15,000 on PyPI
convertdateConverts dates between the Gregorian calendar…
permissive · top 5,000 on PyPI
datedeltadatedelta extends Python's datetime module with…
permissive · top 15,000 on PyPI
simple-icd-10-cmProvides Python functions to validate,…
permissive · top 15,000 on PyPI
workadaysCalculates working days, calendar days, and…
permissive · top 15,000 on PyPI
jdcalConverts between Julian dates and Gregorian or…
permissive · top 5,000 on PyPI
ummalquraConverts between Gregorian and Hijri calendar…
unclear · top 15,000 on PyPI
suntimesCalculates sunrise and sunset times for any…
permissive · top 15,000 on PyPI
hijridateConverts dates between the Hijri (Islamic) and…
permissive · top 5,000 on PyPI