Convex variational problems arise in many fields ranging from image processing to fluid and solid mechanics communities. Interesting applications usually involve non-smooth terms which require well-designed optimization algorithms for their resolution. The present manuscript presents the Python package called fenics_optim built on top of the FEniCS finite element software which enables to automate the formulation and resolution of various convex variational problems. Formulating such a problem relies on FEniCS domain-specific language and the representation of convex functions, in particular non-smooth ones, in the conic programming framework. The discrete formulation of the corresponding optimization problems hinges on the finite element d...