Skip to main content

Python bindings for epiworld

Project description

epiworldPy

ForeSITE Group

This Python package is a wrapper of the C++ library epiworld. It provides a general framework for modeling disease transmission using agent-based models. Some of the main features include:

  • Fast simulation with an average of 30 million agents/day per second.
  • One model can include multiple diseases.
  • Policies (tools) can be multiple and user-defined.
  • Transmission can be a function of agents’ features.
  • Out-of-the-box parallelization for multiple simulations.

See the intro for demos!

Installation

Installation can be performed through pip (pip installs packages), or through your favorite Python package manager (uv is preferable).

pip install epiworldpy

If there’s a feature that’s only available on the repository, and hasn’t yet been published to PyPi, please create an issue so we know to get on publishing. In the meantime, you can clone the repository though Git, and install locally in your virtual environment.

git clone https://github.com/uofUEpiBio/epiworldpy
cd epiworldpy

git checkout $COMMIT
uv install .
pip install .

Quickstart

For a quickstart, please see the intro.

Documentation

This is a short introduction to epiworldPy; for complete documentation, see the API documentation page on the website.

Existing Alternatives

Several alternatives to epiworldPy exist and provide researchers with a range of options, each with its own unique features and strengths, enabling the exploration and analysis of infectious disease dynamics through agent-based modeling. For convenience, the below table is orthogonal to the table on the epiworldR repository.

Package / Framework Multiple Viruses (support >1 pathogen) Multiple Tools (e.g. interventions, contact tracing, NPIs, behavior etc.) Multiple Runs (i.e. ability to run many replicates, parameter sweeps) Global Actions (e.g. policies that affect everyone / global interventions) Built-in Epidemiological Models (SIR, SEIR, etc.) Dependencies / Notes Activity / Maturity
epiworldPy yes yes yes yes yes Python ≥ 3.7; available on PyPI; supports parallel simulations Active; wrapper of epiworld C++ library
Mesa no (by default; you’d implement multiple pathogens yourself) yes (you can code interventions etc.) yes (you can script many runs) yes (you can apply global interventions) no built-in epidemic models per se; it’s a general ABM toolkit Python, uses standard scientific stack (NumPy, etc.); has visualization components Active, widely used; good documentation
AgentPy not clearly documented multiple virus support yes yes yes no default epidemic models; more general ABM framework Python, integrates with Jupyter etc. Relatively newer but seems stable
Epiabm probably no multiple viruses (CovidSim / SEIR base is for one pathogen) yes (modular scenarios, age, spatial heterogeneity, interventions) yes yes (global NPIs etc.) yes (SEIR, more compartments) Python & C++ backends; modular; has docs, tests Recently published, growing
PyRoss not clearly multiple viruses (focus seems single disease with structure) yes (structured contact matrices, NPIs etc.) yes yes yes (age structured ODE/compartmental etc.) Python, requires numpy, scipy etc. Relatively mature; used in COVID work
BESSIE ambiguous / not clearly multiple viruses; seems built for one epidemic at a time yes (behavior, synthetic population, interventions) yes yes (policies / behavior modules) yes (standard epidemic spread etc.) Python; synthetic populations, behavior plugins Active, though specific to research contexts
Epydemix unclear; seems more about epidemic modelling tasks than full ABM with multiple pathogens yes (data analysis, simulation, visualization) yes likely supports global interventions, but unclear yes (epidemic models) Python package, uses scientific stack Newer; preprint stage; less ABM complexity

Code of Conduct

The epiworldPy project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

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

epiworldpy-0.15.0.post0.tar.gz (2.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

epiworldpy-0.15.0.post0-cp313-cp313-macosx_15_0_arm64.whl (654.6 kB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

File details

Details for the file epiworldpy-0.15.0.post0.tar.gz.

File metadata

  • Download URL: epiworldpy-0.15.0.post0.tar.gz
  • Upload date:
  • Size: 2.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.7

File hashes

Hashes for epiworldpy-0.15.0.post0.tar.gz
Algorithm Hash digest
SHA256 9b9f1883061ebfd7f60d6ad70c0d1a8da20023207b51bc1b0eaa710da6a7874c
MD5 187671826eeabb919141f6524beb57c1
BLAKE2b-256 68177e86b8d6db9ab97ae5694222d29989f915d66882b743636aeb26ab912909

See more details on using hashes here.

File details

Details for the file epiworldpy-0.15.0.post0-cp313-cp313-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for epiworldpy-0.15.0.post0-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 5b976cc8100125301d454ef3c67515120be101cd703e4a9df705657ea99e6457
MD5 e4efd238359227274ffc4c1f73e571a1
BLAKE2b-256 8758a226541573203a854bd3bf8d1a9d3151d2fbdbe7e22a0510e581cc19154b

See more details on using hashes here.

Supported by

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