Geraldo is a reports engine with its own API, created in Python language to output PDFs and other formats for complex reports.
Its workflow is the following:
Geraldo does most of what any reports engine does. We can feature the following:
Geraldo is fully dependent from ReportLab, not only because its PDF generation, but also its units and styles library. We have tested with ReportLab version 2.1
Geraldo is not Django dependent, but it can work as a Django pluggable application.
from geraldo import Report
from geraldo.generators import PDFGenerator
class MyReport(geraldo.Report):
title = "Cars I have"
objects_list = User.objects.all() # If you are using Django
report = MyReport(queryset=objects_list)
report.generate_by(PDFGenerator, filename='cars_list.pdf')
This code above will output your report, driven by the queryset ‘objects_list’, into file ‘cars_list.pdf’.
Now, an example in a Django’s view:
from django.http import HttpResponse
from geraldo import Report
from geraldo.generators import PDFGenerator
class MyReport(geraldo.Report):
title = "Cars I have"
def my_view(request):
response = HttpResponse(mimetype='application/pdf')
objects_list = User.objects.all() # If you are using Django
report = MyReport(queryset=objects_list)
report.generate_by(PDFGenerator, filename=resp)
return response
As you can see, now returned the PDF output to HttpResponse, instead of a file.
Geraldo is under Lesser Gnu Public License, take a look on the following URL to read it:
http://www.gnu.org/copyleft/lesser.html
Geraldo has been created by Marinho Brandao a brazilian Django and Python enthusiast.
Home page: http://marinhobrandao.com/
E-mail: marinho at gmail dot com