wktopdf is a set of Python bindings to the whtmltopdf C library. wktopdf works with Python 2&3 as well as PyPy, and is released under the MIT license.
It aims at providing a (more) convenient way to generate PDF files from HTML resources. A mandatory code sample:
>>> pdf = wktopdf.from_html('<h1>Hello world!</h1>')
>>> pdf.bytes
...
>>> pdf.save_to_file('hello_world.pdf')Even though wktopdf is already working for some simple cases, it should still be considered highly experimental.
TODO
Pygit2 has to be credited for the way these bindings are written as most of the setup code and the C interface is extracted from there.