We show that the module of integral points on a Drinfeld module satisfies an analogue of Dirichlet's unit theorem, despite its failure to be finitely generated. As a consequence, we obtain a construction of a canonical finitely generated sub-module of the module of integral points. We use the results to give a precise formulation of a conjectural analogue of the class number formula.