Problem to use .html file that contain jinja, with python file

Hi there, i Tried to make a report with jinja template with python in frappe , but i am confused how would it work,or what wolud be its flow. please help someone.
@erpnextuser
@franklinprakash