We present the first open-source analysis of parton distribution functions (PDFs) of charged pions using xFitter, an open-source QCD fit framework to facilitate PDF extraction and analyses. Our calculations are implemented at next-to-leading order (NLO) using applgrids generated by the mcfm generator. Using currently available Drell-Yan and photon production data, we find the valence distribution is well constrained; however, the considered data are not sensitive enough to unambiguously determine sea and gluon distributions. Fractions of momentum carried by the valence, sea and gluon components are discussed, and we compare with the results of the JAM collaboration and the GRV group.