  Ground-based astronomical spectra are contaminated by the Earth's atmosphere
to varying degrees in all spectral regions. We present a Python code that can
accurately fit a model to the telluric absorption spectrum present in
astronomical data, with residuals of $\sim 3-5\%$ of the continuum for
moderately strong lines. We demonstrate the quality of the correction by
fitting the telluric spectrum in a nearly featureless A0V star, HIP 20264, as
well as to a series of dwarf M star spectra near the 819 nm sodium doublet. We
directly compare the results to an empirical telluric correction of HIP 20264
and find that our model-fitting procedure is at least as good and sometimes
more accurate. The telluric correction code, which we make freely available to
the astronomical community, can be used as a replacement for telluric standard
star observations for many purposes.
