We introduce a new software package for modelling the point spread function (PSF) of astronomical images, called piff (PSFs In the Full FOV), which we apply to the first three years (known as Y3) of the Dark Energy Survey (DES) data. We describe the relevant details about the algorithms used by piff to model the PSF, including how the PSF model varies across the field of view (FOV). Diagnostic results show that the systematic errors from the PSF modelling are very small over the range of scales that are important for the DES Y3 weak lensing analysis. In particular, the systematic errors from the PSF modelling are significantly smaller than the corresponding results from the DES year one (Y1) analysis. We also briefly describe some planned improvements to piff that we expect to further reduce the modelling errors in future analyses.