Люблю тебя, печати место!
     — К.Прутков, "К месту печати"

… rather exciting isn't it?
     — Vocational Guidance Counsellor


PythonReports is a toolkit aimed to build database reports in Python® programs. The toolkit includes report template designer, report builder and several printout renderers for GUI and graphic file output.

Report builder applies a template to a sequence of uniform data objects and produces a printout structure that can be saved in a file and/or rendered by one of the front-end drivers to screen, printer, HTML (1), PDF etc.


PythonReports require Python version 2.4(2) to 2.7.

All parts of the PythonReports toolkit require the ElementTree module. Python includes this module as part of the standard library since version 2.5. Python 2.4 users can download separate distribution package from http://effbot.org/downloads/ (cElementTree add-on is highly recommended too).

Requirements for printout rendering depend on selected frontend:
  • PDF output requires the ReportLab Toolkit. Reports containing images additionally require Python Imaging Library (PIL or Pillow).
  • wx-based preview and printing require wxPython.
  • Tk-based report preview requires Tkinter (part of the Python Standard Library). Reports containing images additionally require PIL or wxPython.

Report building can utilize any of the above options. In other words, if your system is able to display or print a report then it should be able to build a report too.

Templates in RSON format (introduced in v0.7.0) require rsonlite.

Report template designer requires Tkinter with Tix support (standard Python installer for Windows includes Tix; on some platforms Tix must be installed separately).

WYSIWIG template editor requires wxPython. For wxPython versions prior to 2.9 wxPropertyGrid must be installed as a separate module (3).

Quick Start

No documentation yet. Please look at the test script for report building example. All printout rendering modules (pdf, Tk and wxPrint) have command line interface that can serve as their API usage example.

Python® and the Python logos are trademarks or registered trademarks of the Python Software Foundation.
(1) HTML output is not implemented yet.
(2) Later versions have been tested only with Python 2.7 and 2.6. Compatibility with Python 2.4 and 2.5 may be unintentionally broken. Please file an issue if you encounter errors.
(3) Note: the first Windows installer on the wxPropertyGrid download page installs source code only; scroll down for binaries.