We present a novel framework to streamline the calculation of jet and
beam functions to next-to-next-to-leading order in perturbation theory.
By exploiting the infrared behavior of the collinear splitting functions,
we factorize the singularities with suitable phase-space parametrizations
and perform the observable-dependent integrations numerically. We have
implemented our approach in the publicly available code PySecDec and
present the first results for sample jet and beam functions.