BoltzTraP2 is a software package for calculating a smoothed Fourier expression of periodic functions and the Onsager transport coefficients for extended systems using the linearized Boltzmann transport equation. It uses only the band and \(k\)-dependent quasi-particle energies, as well as the intra-band optical matrix elements and scattering rates, as input. The code can be used via a command-line interface and/or as a Python module. It is tested and illustrated on a simple parabolic band example as well as silicon. The positive Seebeck coefficient of lithium is reproduced in an example of going beyond the constant relaxation time approximation.