abstract non-Flask based template processing