MetapopPy is a Python library designed to aid the creation of metapopulation-based models. TBMetapopPy extends this framework to create models that simulate a tuberculosis (TB) infection within the alveolar tissue of the lung and the associated lymphatics. Both libraries are divided into 3 sections: Environment (the terrain on which the simulation occurs - a metapopulation network of patches and edges, with each patch contain subpopulations and environmental attributes), Events (Gillespie Algorithm-based reactions which determine the dynamics of interactions between the subpopulation compartments and their environment) and Model (which joins the Environment with the Events).