Skip to main content

An easy solution to design reports using OpenOffice

Project description

Introduction

py3o is an elegant and scalable solution to design reports using LibreOffice or OpenOffice. py3o.template is the templating component that takes care of merging your datasets with a corresponding templated OpenOffice document.

It is plateform independant and does not require LibreOffice/OpenOffice itself to generate an ODF file. If you want to generate a PDF or any other support output format you will then need to have a server with either LibreOffice or OpenOffice and to install the py3o.renderserver on it.

Example Usage

Below is an example that you can find in the source tarball inside the examples directory.

from py3o.template import Template

t = Template("py3o_example_template.odt", "py3o_example_output.odt")

class Item(object): pass

items = list()

item1 = Item()
item1.val1 = 'Item1 Value1'
item1.val2 = 'Item1 Value2'
item1.val3 = 'Item1 Value3'
item1.Currency = 'EUR'
item1.Amount = '12345.35'
item1.InvoiceRef = '#1234'
items.append(item1)

for i in xrange(1000):
    item = Item()
    item.val1 = 'Item%s Value1' % i
    item.val2 = 'Item%s Value2' % i
    item.val3 = 'Item%s Value3' % i
    item.Currency = 'EUR'
    item.Amount = '6666.77'
    item.InvoiceRef = 'Reference #%04d' % i
    items.append(item)

document = Item()
document.total = '9999999999999.999'

data = dict(items=items, document=document)
t.render(data)

Project details


Download files

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

Source Distributions

py3o.template-0.4.zip (9.8 kB view details)

Uploaded Source

py3o.template-0.4.tar.gz (5.8 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

py3o.template-0.4-py27-none-any.whl (8.3 kB view details)

Uploaded Python 2.7

py3o.template-0.4-py2.7.egg (11.2 kB view details)

Uploaded Egg

File details

Details for the file py3o.template-0.4.zip.

File metadata

  • Download URL: py3o.template-0.4.zip
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for py3o.template-0.4.zip
Algorithm Hash digest
SHA256 01ee7d37336bc10edfa046c2d045475d1944f1eb23e4e60188bbbf208bd0028c
MD5 1e247c913dd5f33edf2a0da99ae8aa28
BLAKE2b-256 ddb537a654ee1954b6ee42b90c9aa1ece2afe44b06f87ef110280560b0b2435b

See more details on using hashes here.

File details

Details for the file py3o.template-0.4.tar.gz.

File metadata

  • Download URL: py3o.template-0.4.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for py3o.template-0.4.tar.gz
Algorithm Hash digest
SHA256 049ccc450ee7be8ddd3b3a574498ef52bcd51477fb79ed82f6f514fe1c88271b
MD5 704213b3bb09aa4840951d905041670c
BLAKE2b-256 fc6c76853ce2e1f744d4e1ed5a2ac58f9e0a64bd31cdf6bfb94cb9794f3b53cd

See more details on using hashes here.

File details

Details for the file py3o.template-0.4-py27-none-any.whl.

File metadata

File hashes

Hashes for py3o.template-0.4-py27-none-any.whl
Algorithm Hash digest
SHA256 95e1112b2d5a88a8e7fd308fdce50b4f789b1421f61cd8cae050e0e6c028cd55
MD5 966e82a2dd13ad52e064a6725446df3c
BLAKE2b-256 d90a2d1e4bb90b8acf5c4f9d5bb243a4589c30e18a293e203d168e63a72f9660

See more details on using hashes here.

File details

Details for the file py3o.template-0.4-py2.7.egg.

File metadata

File hashes

Hashes for py3o.template-0.4-py2.7.egg
Algorithm Hash digest
SHA256 19419a84169cd02b086d5c07e8adfc7fef0a05fc5d56f0b0d8b0b5a3417bc675
MD5 570b8644ce9bfd27374061239293ed9b
BLAKE2b-256 82636e6871150ee5f449c5fb5144d8b5b94bbaac1ae7db0c49a9b2da0ac09904

See more details on using hashes here.

Supported by

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