Can we use emPy, ReST, and/or YAML for report generation

S

Samir Patel

Currently main choice to create a report in python is reportlab. It
allows a fine control over creation of report at cost of bigger
learning curve. Instead of reportlab, does it make sense to generate
small reports using emPy or ReST with or without use of YAML? Are
there any other choice to create small reports easily in python?
 
J

Jegenye 2001 Bt

It's not quite clear what report you mean..
If you want to make PDFs with Python then reportlab is fine. The steep
learning curve could be flattened a bit by using their RXML solution, i.e.
an XML layout.
This does cost money.

Also, one can generate nice reports with LaTeX and the learning curve is not
that steep. Postscript (latex -> dvi -> ps) and HTML (latex2html or ht) come
easily.
PS can be converted into PDF with ps2pdf but you can make PDFs with pdflatex
directly as well. (it's a better option)

Or use some other mark-up tools: LinuxBook, DocBook, lout, etc. (wouldn't
recommend groff or troff.. <wink>)
These are all multi-output formats, so you can directly get "final output"
formats like HTML, PS or PDF.
Or use something like the Python-based "AsciiDoc" ( converts an AsciiDoc
text file to DocBook, HTML or LinuxDoc ) or reST, etc.

You can use, say, emPy, of course, to generate the input to any of the
above. And there are other templating engines if you want something else.

Or... there are miriads of choices out there.


Have a nice digging. :)
Miklós
 
E

Erik Max Francis

Samir said:
Currently main choice to create a report in python is reportlab. It
allows a fine control over creation of report at cost of bigger
learning curve. Instead of reportlab, does it make sense to generate
small reports using emPy or ReST with or without use of YAML? Are
there any other choice to create small reports easily in python?

It's certainly quite feasible to use EmPy for this purpose -- Dinu
Gherman, for instance, used EmPy itself (along with ReportLab's
PythonPoint package) to build his EmPy presentation for EuroPython:

http://starship.python.net/crew/gherman/presentations/empy-epc2003.pdf
 
B

Brad Clements

I use FOP from Apache.org. Python pulls data from SAPDB and I write it out
as XML. FOP makes it into a PDF

Nice thing is, the same XML data creates my web pages using client-side XSLT
or server-side xlst (with zope). I also use the same xml to make customer
invoices (through FOP) .

We originally used ReportLab to make PDF reports, but every new report
required a lot of tedious programming in Python. ReportLab produces good
output, but FOP gave us more flexability.

I bet RXML would be good, but that didn't exist when we moved to FOP.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top