  We present NPTFit, an open-source code package, written in python and cython,
for performing non-Poissonian template fits (NPTFs). The NPTF is a
recently-developed statistical procedure for characterizing the contribution of
unresolved point sources (PSs) to astrophysical data sets. The NPTF was first
applied to Fermi gamma-ray data to give evidence that the excess of ~GeV
gamma-rays observed in the inner regions of the Milky Way likely arises from a
population of sub-threshold point sources, and the NPTF has since found
additional applications studying sub-threshold extragalactic sources at high
Galactic latitudes. The NPTF generalizes traditional astrophysical template
fits to allow for the ability to search for populations of unresolved PSs that
may follow a given spatial distribution. NPTFit builds upon the framework of
the fluctuation analyses developed in X-ray astronomy, and thus likely has
applications beyond those demonstrated with gamma-ray data. The NPTFit package
utilizes novel computational methods to perform the NPTF efficiently. The code
is available at https://github.com/bsafdi/NPTFit and up-to-date and extensive
documentation may be found at http://nptfit.readthedocs.io
