Established closed-form analytical solutions for using heat as a tracer of vertical groundwater fluxes typically rely on assumptions of steady hydraulic conditions. We introduce a novel analytical approach and associated tool, PyTFLUX, to account for transient changes in vertical groundwater fluxes. The analytical solution uses a Fourier series to represent diurnal surface temperature variability and a differential method to represent vertical flux changes. Optimization techniques are employed to achieve faster convergence and prevent the estimation of unreasonable vertical fluxes. The PyTFLUX script, presented in a Python Jupyter notebook, enables the easy adoption of the new analytical framework. To test the new approach, illustrative transient vertical flux time series were developed for three time-varying groundwater flux scenarios: a step-change, a single sine-wave, and a mixed sine-wave. These profiles were analyzed to infer vertical groundwater flux time series using PyTFLUX and previously published methods implemented in VFLUX2. Results show that PyTFLUX can reproduce temporal variability in groundwater fluxes not typically captured by existing methods. Finally, previously published high-resolution sediment temperature data from the Quashnet River in Massachusetts, USA, were analyzed to demonstrate the efficacy of PyTFLUX in analyzing complex field data. The analysis of field data yielded a vertical flux time series with mean values that agreed with fluxes yielded from other approaches, but the new approach also revealed pronounced temporal flux variability that was obscured by other methods.