emod-api
emod-api is a set of Python tools for working with EMOD configuration, campaign, and output files.
Project status
EMOD-Hub projects are provided as open source software under the MIT License for community use, research, and development.
Unless otherwise noted, these projects are no longer actively maintained or supported by IDM or the Gates Foundation.
Community contributions are welcome, and trusted collaborators may review and merge pull requests, but no guarantees are made regarding support, pull request review, security response, maintenance, or release timelines.
Python Version
Python 3.13 is the recommended and supported version.
Documentation
Documentation available at https://emod.idmod.org/emod-api/
To build the documentation locally, do the following:
- Create and activate a venv.
- Navigate to the root directory of the repo.
python -m pip install .[docs] mkdocs serve
Dependencies
Linux
emod-api can use Snappy [de]compression (python-snappy) as necessary if it is installed, which requires libsnappy-dev on Ubuntu 22.04 (Jammy Jellyfish).
Ubuntu: [sudo] apt install libsnappy-dev
NOTE: The python-snappy version needs to be 0.6.1. Newer versions have problems working correctly with emod-api.
User Stories
Input
- User wants to be able to create a minimal working config.json for any sim type guaranteed to work with a given Eradication binary.
- User wants to be able to create config.json from large static 'defaults' file and small variable parameters-of-interest file.
- User wants to be able to create guaranteed to work campaigns without having to interact with campaign.json files.
- User wants to create a migration file without having to grok our custom binary migration format.
- User wants to be able to create large multi-node demographics files programatically.
Output
- User wants to be able to get post-processed (cleaned up) schema.
- User wants to be able to get data from InsetChart.json without worrying about exact file format of the files.
- User wants to be able to extract data of interest from spatial binary files.
- User wants to be able to work easily with serialization files.
- User wants to be able to work easily with (pending) events.sql file.
Capability Wishlist
- Migration files: users should never have to edit migration binary or header files.
- Serialization: Population manipulation, such as adding IPs or adding risk factors.
- Demographics: HINT matrices should not be created directly in demographics.
- Demographics: Population demographic initalization should be easier and reliable.
- Config: param_overrides and custom events.
Running tests
Please see the documentation for testing.
Community
Have a question or a comment? Check out our Discussions space.
Contributing
If you have feature requests, issues, or new code, please see our CONTRIBUTING page for how to provide your feedback.
Disclaimer
The code in this repository was developed by IDM and other collaborators to support our joint research on flexible agent-based modeling. We've made it publicly available under the MIT License to provide others with a better understanding of our research and an opportunity to build upon it for their own work. We make no representations that the code works as intended or that we will provide support, address issues that are found, or accept pull requests. You are welcome to create your own fork and modify the code to suit your own modeling needs as permitted under the MIT License.
Metadata
Release files for emod-api 3.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| emod_api-3.2.3.tar.gz | 132.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| emod_api-3.2.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 246.6 kB
Release files / emod_api-3.2.3.tar.gz
| Download URL | emod_api-3.2.3.tar.gz |
|---|---|
| Size | 132.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ce057a8e1fadaf045ccda503fa88ac0bd16c45937661cdd3cd25b047170f235e
|
|
BLAKE2b-256 checksum How to use checksums |
ca9a5bd68999271fbd3906916b4e97c453e889f5f0ef656f58911b34a174b609
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency logRelease files / emod_api-3.2.3-py3-none-any.whl
| Download URL | emod_api-3.2.3-py3-none-any.whl |
|---|---|
| Size | 113.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9da58d0c157b5ba9de49044e3ea8daf74a9417cb8bc0b5d712f2564f71a395bc
|
|
BLAKE2b-256 checksum How to use checksums |
97f5872acad91a9e5054fb09c2b5aa4de2bab47e1432bb0ea9a487526d2fd0dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency log