Hydra
Hydra is a light template engine for ocaml or python. Using Hydra, python or ocaml macros can be inserted inside text file. These macros can be then evalued to generate normal text files. Originally, Hydra was developped to insert the result of python computations inside a latex file.
However, this library should be usable in a larger context.
The source code and supplementary information are available on the github repository.