Hello world
The fastest way to test Geraldo is run this code in your shell/console:
$ python easy_install reportlab geraldo
$ python
>>> from geraldo import Report, DetailBand, ObjectValue
>>> from geraldo.utils import cm
>>> from geraldo.generators import PDFGenerator
>>> names = ['Mychelle', 'Leticia', 'Tarsila', 'Marta', 'Vera', 'Leni']
>>> class MyReport(Report):
... class band_detail(DetailBand):
... height=0.7*cm
... elements=[
... ObjectValue(attribute_name='capitalize'),
... ]
>>> report = MyReport(queryset=names)
>>> report.generate_by(PDFGenerator, filename='female-names.pdf')
The output will be this:
Really getting started
To (really) get start to use Geraldo on your Python (or Django project), you can follow the steps below:
- Get the Geraldo Reports
- Install it
- If you are using Django, Follow the first Tutorial. If you are using Web2py, there is a tutorial too.
- Not matters if you aren't using one of frameworks above, look at the examples
- Get help on the discussion groups
- Get enjoy :)