PyLaTeX is a Python library for creating and compiling LaTeX files. The goal of this library is to be an easy, but extensible interface between Python and LaTeX.
PyLaTeX has two quite different usages: generating full pdfs and generating LaTeX snippets. Generating full pdfs is mostly useful when all the text that pdf should contain is generated by python, for instance exporting the data from a database. Snippets are useful when some text still needs to be written by hand, but some stuff can be automatically generated, for instance writing a report with a couple of matplotlib plots.