Buy Tickets
Starting from 350€
Support unavailable
Please try again later

JSON data + RML template = PDF report

by Stefano Cotta Ramusino for EuroPython 2011

The main problem with reports generated in Python is how to separate the content from the style using ReportLab library, because all informations should be saved in a single source file that, by example, is impossible to understand for your graphic designer.

So the solution: just modularizes all components you need and identify simple container formats for your data input (JSON) and document template (ReportLab RML).

Now with the power of Genshi and XInclude we will create dynamic templates that include specific snippets (e.g., to generate on the fly a decent graph with matplotlib or cairoplot to fill some lacks of ReportLab) and we will detach the stylesheet from the template structure.

And at the end you can also have the internationalization service in the PDF report generation!

Video

Do you have some questions on this talk? Leave a comment to the speaker!

New comment


Language
EN
Duration
45 minutes
Our Sponsors
Spotify
Python Experts
Personnel development with 360° feedback
SSL Matrix
Wanna sponsor?