Skip to main content

Band-oriented PDF report generation from database query

Project description

Band-oriented PDF report generation from database query

PollyReports.py provides a set of classes for database report writing. It assumes that you are using Reportlab to do PDF generation, but can work with any “canvas-like” object as desired.

PollyReports provides a framework for report generation. The developer instantiates a Report object, passing it a data source and passing or assigning one or more Band objects. A Band, in turn, will contain a list of Elements representing data items, labels, or system variables which will be printed. When the Report object is fully populated, its generate() method is called, passing in a Reportlab Canvas object (or any object providing a similar interface); the Report object then consumes the data source and renders the various Bands of Elements into the Canvas object.

The data source must be an iterator that produces objects that can be accessed via [] operations, meaning mainly dict, list, and tuple types, i.e. the most common types of records returned by standard database modules.

This version is written for Python 2.7, but should be easily adapted to Python 3.

Development versions of this module may be found on Github.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

PollyReports-1.8.tar.gz (21.9 kB view details)

Uploaded Source

File details

Details for the file PollyReports-1.8.tar.gz.

File metadata

  • Download URL: PollyReports-1.8.tar.gz
  • Upload date:
  • Size: 21.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/2.7

File hashes

Hashes for PollyReports-1.8.tar.gz
Algorithm Hash digest
SHA256 a5d90ce9adce901c794d40b7aa011ed59ebb82b3e6c2831e3cddaa9ac86f5bfa
MD5 15e632ec8d9de3bae69bc0679be59190
BLAKE2b-256 afe8329490aab33b1b7d53c992673c7e3e6f3024ba2fccd71760c95f9b9ca35d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page