Specially the method action_export in the class zipexport.ExportForm using the methods of collective.zipfiletransport.utilities.interfaces.ZipFileTransportUtility.
The package collective.zipfiletransport is old but some of its code might help get your use case working.
I have a template.pt.
If I register this as a (browser) view, I can get this from my (other) .py view.
From (other)view.py, I can then make a pdf (maybe with pdfkit.from_url('url_of_browser_view','out.pdf') and then use the same (or another view) to find the images etc used ( soup.find_all('img' )
But: do I really have to 'call it as a view', would it not be better to just 'use the template.pt from the py file?' (they would both be in the same add-on)?