Abstract : 2 As part of fMRI data analysis, the pyhrf package provides a set of tools for addressing the two 3 main issues involved in intra-subject fMRI data analysis: (i) the localization of cerebral regions 4 that elicit evoked activity and (ii) the estimation of the activation dynamics also referenced to 5 as the recovery of the Hemodynamic Response Function (HRF). To tackle these two problems, 6 pyhrf implements the Joint Detection-Estimation framework (JDE) which recovers parcel-level 7 HRFs and embeds an adaptive spatio-temporal regularization scheme of activation maps. With 8 respect to the sole detection issue (i), the classical voxelwise GLM procedure is also available 9 through nipy, whereas Finite Impulse Response (FIR) and temporally regularized FIR models 10 are implemented to deal with HRF estimation concerns (ii). Several parcellation tools are also 11 integrated such as spatial and functional clustering. Parcellations may be used for spatial 12 averaging prior to FIR/RFIR analysis or to specify the spatial support of the HRF estimates 13 in the JDE approach. These analysis procedures can be applied either to volumic data sets or 14 to data projected onto the cortical surface. For validation purpose, this package is shipped with 15 artificial and real fMRI data sets, which are used in this paper to compare the outcome of the 16 different available approaches. The artificial fMRI data generator is also described to illustrate 17 how to simulate different activation configurations, HRF shapes or nuisance components. To 18 cope with the high computational needs for inference, pyhrf handles distributing computing 19 by exploiting cluster units as well as multiple cores computers. Finally, a dedicated viewer is 20 presented, which handles n-dimensional images and provides suitable features to explore whole 21 brain hemodynamics (time series, maps, ROI mask overlay).