We present MAPFF1.0, a determination of unpolarised charged-pion fragmentation functions (FFs) from a set of single-inclusive $e^+e^-$ annihilation and lepton-nucleon semi-inclusive deep-inelastic-scattering (SIDIS) data. FFs are parametrised in terms of a neural network (NN) and fitted to data exploiting the knowledge of the analytic derivative of the NN itself w.r.t. its free parameters. Uncertainties on the FFs are determined by means of the Monte Carlo sampling method properly accounting for all sources of experimental uncertainties, including that of parton distribution functions. Theoretical predictions for the relevant observables, as well as evolution effects, are computed to next-to-leading order (NLO) accuracy in perturbative QCD. We exploit the flavour sensitivity of the SIDIS measurements delivered by the HERMES and COMPASS experiments to determine a minimally-biased set of seven independent FF combinations. Moreover, we discuss the quality of the fit to the SIDIS data with low virtuality $Q^2$ showing that, as expected, low-$Q^2$ SIDIS measurements are generally harder to describe within a NLO-accurate perturbative framework.