  Ultra-high-energy neutrinos serve as messengers of some of the highest energy
astrophysical environments. Given that neutrinos are neutral and only interact
via weak interactions, neutrinos can emerge from sources, traverse astronomical
distances, and point back to their origins. Their weak interactions require
large target volumes for neutrino detection. Using the Earth as a neutrino
converter, terrestrial, sub-orbital, and satellite-based instruments are able
to detect signals of neutrino-induced extensive air showers. In this paper, we
describe the software code $\texttt{nuPyProp}$ that simulates tau neutrino and
muon neutrino interactions in the Earth and predicts the spectrum of the
$\tau$-lepton and muons that emerge. The $\texttt{nuPyProp}$ outputs are lookup
tables of charged lepton exit probabilities and energies that can be used
directly or as inputs to the $\texttt{nuSpaceSim}$ code designed to simulate
optical and radio signals from extensive air showers induced by the emerging
charged leptons. We describe the inputs to the code, demonstrate its
flexibility and show selected results for $\tau$-lepton and muon exit
probabilities and energy distributions. The $\texttt{nuPyProp}$ code is open
source, available on Github.
