pyOptFEM is a Python module providing simple and efficient vectorized routines for assembling P1-Lagrange Finite Element matrices in 2d and 3d.