The open-source Python package thermal-bw calculates isotropic gamma-ray absorption and secondary pair spectra, with a blackbody surrogate that achieves a maximum validated relative error of 0.316%.