Skip to main content

Epidemiological weeks calculation based on the US CDC (MMWR) and ISO week numbering systems

Project description


A Python package to calculate epidemiological weeks using the US CDC (MMWR) and ISO week numbering systems.


  • Support for both the US CDC (MMWR) and ISO week numbering systems.
  • Accurate and tested calculations.
  • Intuitive, clean, and easy-to-use interface.
  • Calculation of the start and end dates of weeks.
  • Iteration of year's weeks or week's dates.
  • Rich comparison between weeks.
  • Logical operations for weeks (addition, subtraction and containment).
  • Validation of input data.
  • Works on Python 3.8+ with zero dependencies.
  • Thoroughly tested with 100% test coverage.


To install using pip, run:

pip install epiweeks

To install using conda, run:

conda install -c bioconda epiweeks

Basic Usage

from epiweeks import Week, Year

week = Week(2019, 1)
# 2019-01-05

for week in Year(2019).iterweeks():
# 2019-01-05
# 2019-01-12
# ...
# 2019-12-21
# 2019-12-28


Please see for full documentation of this package, including background, more usage examples and API reference.


This project is licensed under the terms of the MIT license.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

epiweeks-2.3.0.tar.gz (18.9 kB view hashes)

Uploaded Source

Built Distribution

epiweeks-2.3.0-py3-none-any.whl (5.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page