Run
import pdfkit pdfkit.from_file('local.html', 'sample.pdf')
Output