Epidemiological weeks calculation based on CDC and ISO week numbering systems
Project description
EpiWeeks
A Python package for accurate epidemiological weeks calculation using the US CDC (MMWR) and ISO week numbering systems.
EpiWeeks provides reliable week calculations validated against CDC reference data, essential for disease surveillance, public health reporting, and epidemiological research.
✨ Features
- Support for both the US CDC (MMWR) and ISO week numbering systems
- Accurate and tested calculations validated against CDC reference data
- 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)
- Comprehensive input validation and error handling
- Full type annotations and 100% test coverage
- Zero runtime dependencies
📦 Installation
To install using uv, run:
uv add epiweeks
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)
print(week.enddate())
# 2019-01-05
for week in Year(2019).iterweeks():
print(week.enddate())
# 2019-01-05
# 2019-01-12
# ...
# 2019-12-21
# 2019-12-28
📚 Documentation
Please refer to https://epiweeks.readthedocs.io for complete documentation on this package, which includes background information, usage examples, and API reference.
🤝 Contributing
If you're interested in contributing, please check out the Contributing guide for more information on how you can help!
📄 License
This project is licensed under the terms of the MIT license.
📝 Citation
If you plan to cite this project in your academic publication, please refer to https://doi.org/10.5281/zenodo.18171641 for citation information.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file epiweeks-2.4.0.tar.gz.
File metadata
- Download URL: epiweeks-2.4.0.tar.gz
- Upload date:
- Size: 21.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0096132a50cfc4b52b2bfc8cf841d278740414d01cac303df05146db8b526539
|
|
| MD5 |
dffbd9246f2c0f0edfcfd0c86c5f828c
|
|
| BLAKE2b-256 |
78518b749e2756cc739cf2a5009ae8d4dbf6ca110e2ac59916351a5c2948ba82
|
Provenance
The following attestation bundles were made for epiweeks-2.4.0.tar.gz:
Publisher:
pypi-release.yml on dralshehri/epiweeks
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
epiweeks-2.4.0.tar.gz -
Subject digest:
0096132a50cfc4b52b2bfc8cf841d278740414d01cac303df05146db8b526539 - Sigstore transparency entry: 803046565
- Sigstore integration time:
-
Permalink:
dralshehri/epiweeks@0450e139e8b6459336201cf439d01647a2df1fd0 -
Branch / Tag:
refs/tags/v2.4.0 - Owner: https://github.com/dralshehri
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-release.yml@0450e139e8b6459336201cf439d01647a2df1fd0 -
Trigger Event:
release
-
Statement type:
File details
Details for the file epiweeks-2.4.0-py3-none-any.whl.
File metadata
- Download URL: epiweeks-2.4.0-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a40cdde09b47530e7703d3d75248bb4ae2eb340f23af7c4c50e708b2e733e101
|
|
| MD5 |
b70725725ffa71ae8cd35129c4e94d37
|
|
| BLAKE2b-256 |
40cf66d80e94012fedb1ad9edb3053281685ad920b14dcd5e7166a48bbd1f168
|
Provenance
The following attestation bundles were made for epiweeks-2.4.0-py3-none-any.whl:
Publisher:
pypi-release.yml on dralshehri/epiweeks
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
epiweeks-2.4.0-py3-none-any.whl -
Subject digest:
a40cdde09b47530e7703d3d75248bb4ae2eb340f23af7c4c50e708b2e733e101 - Sigstore transparency entry: 803046600
- Sigstore integration time:
-
Permalink:
dralshehri/epiweeks@0450e139e8b6459336201cf439d01647a2df1fd0 -
Branch / Tag:
refs/tags/v2.4.0 - Owner: https://github.com/dralshehri
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-release.yml@0450e139e8b6459336201cf439d01647a2df1fd0 -
Trigger Event:
release
-
Statement type: