We present pySecDec, a new version of the program SecDec, which performs the factorisation of dimensionally regulated poles in parametric integrals, and the subsequent numerical evaluation of the finite coefficients. The algebraic part of the program is now written in the form of python modules, which allow a very flexible usage. The optimization of the C++ code, generated using FORM, is improved, leading to a faster numerical convergence. The new version also creates a library of the integrand functions, such that it can be linked to user-specific codes for the evaluation of matrix elements in a way similar to analytic integral libraries. (2015) 470-491. Nature of the problem: Extraction of ultraviolet and infrared singularities from parametric integrals appearing in higher order perturbative calculations in quantum field theory. Numerical integration in the presence of integrable singularities (e.g. kinematic thresholds). Solution method: Algebraic extraction of singularities within dimensional regularization using iterated sector decomposition. This leads to a Laurent series in the dimensional regularization parameter (and optionally other regulators), where the coefficients are finite integrals over the unit-hypercube. Those integrals are evaluated numerically by Monte Carlo integration. The integrable singularities are handled by choosing a suitable integration contour in the complex plane, in an automated way. The parameter integrals forming the coefficients of the Laurent series in the regulator(s) are provided in the form of libraries which can be linked to the calculation of (multi-) loop amplitudes. Restrictions: Depending on the complexity of the problem, limited by memory and CPU time. Running time: Between a few seconds and several days, depending on the complexity of the problem.