PyPlants is a collection of disease and phenological models for plants. The main purpose of this library is to enable both developers and researchers to use models described in the scientific literature.
PyPlants is available on PyPI and can be installed as follow:
$ python -m pip install pyplantsAs for now, we support Python 3.8+.
The package is subdivided in two main sub-packages, pyplants.phenology and pyplants.diseases. In general, each model implements its own logic that can be invoked with the update method. Models accept in input an UpdateCtx object, which collect classic agrometeorological parameters.
>>> from datetime import datetime
>>> from pyplants.core.context import UpdateCtx
>>> from pyplants.diseases.grape.pm import Moyer
>>> model = Moyer()
>>> uctx = UpdateCtx(dt=datetime(2026, 1, 1, 0, 0), tmax=5, rain=0, step="d")
>>> model.update(uctx)
>>> # You call update when a new update context is available
>>> # The output of the model is stored inside the events property
>>> model.events[0]
DiseaseEvent(
dt=datetime.datetime(2026, 1, 1, 0, 0),
spore_release=0.0,
infection=None,
extra_fields={'asc_p': 0.035371388525063274})Full documentation is available at: ReadTheDocs
If you use this package in your research, please consider citing the original publication.
@article{PyPlants2026,
title = {PyPlants: an open-source python package implementing disease and phenological models for plants},
journal = {SoftwareX},
volume = {36},
pages = {103062},
year = {2026},
issn = {2352-7110},
doi = {https://doi.org/10.1016/j.softx.2026.103062},
url = {https://www.sciencedirect.com/science/article/pii/S2352711026005534},
author = {Giovanni Paolo Colucci and Irene Salotti and Paola Battilani and Daniele Trinchero}
}
Enjoy.