Skip to main content

UnoGenerator PyPI - Downloads Github - Downloads Tests

Description

UnoGenerator is a powerful Python module designed to generate LibreOffice documents (ODT and ODS) programmatically with high performance and professional aesthetics.

Key features include:

  • Professional Defaults: Automatic text wrapping (word_wrap=True) and vertical centering for professional-looking reports out of the box.
  • High Performance: Optimized for large datasets. Inserting 10,000 rows with default formatting takes less than 0.3 seconds.
  • Rich Exports: Easy export to .xlsx, .docx, and .pdf.
  • Advanced Helpers: Flexible totals generation, automatic column width calculation, and complex data block handling.
  • Multilingual Support: Built-in support for translations and localized document generation.

It uses the LibreOffice UNO module, requiring a LibreOffice installation on your system.

Installation

Only Linux is supported. See the installation guide for detailed instructions on main Linux distributions.

Architecture

UnoGenerator follows a clean, template-based architecture:

  • ODS/ODT: Generic base classes for document manipulation.
  • ODS_Standard / ODT_Standard: Optimized subclasses that use the built-in professional templates, providing specific styles (like "Normal", "BoldCenter") and optimized row heights.

ODT 'Hello World' example

Create a professional ODT document with just a few lines:

from unogenerator import ODT_Standard

with ODT_Standard() as doc:
    doc.addParagraph("Hello World", "Heading 1")
    doc.addParagraph("Easy, isn't it", "Standard")
    doc.save("hello_world.odt")
    doc.export_docx("hello_world.docx")
    doc.export_pdf("hello_world.pdf")

ODS 'Hello World' example

Generate a styled spreadsheet with automatic wrapping and alignment:

from unogenerator import ODS_Standard

with ODS_Standard() as doc:
    # word_wrap and vertical alignment are enabled by default
    doc.addCellMergedWithStyle("A1:E1", "Sales Report 2026", style="BoldCenter")
    doc.addRowWithStyle("A2", ["Product", "Quantity", "Price", "Total"])
    doc.save("sales_report.ods")
    doc.export_xlsx("sales_report.xlsx")

Advanced Features: Totals and Formulas

UnoGenerator provides advanced helpers to generate calculations quickly:

from unogenerator import helpers

# Generates both row and column totals with a custom formula template
helpers.cross_totals_from_range(doc, "B2:D10", key="=SUM({}*1.21)")

Unogenerator scripts

The package includes several useful CLI tools:

unogenerator_monitor

Monitors your LibreOffice server instances and their status.

unogenerator_translation

Translate multiple ODT files using standard .pot and .po files. unogenerator_translation --from_language es --to_language en --input original.odt --output_directory "translated"

unogenerator_demo

Generate comprehensive example files and perform performance benchmarks on your system.

Documentation

Full technical documentation is available in the doc directory, created using UnoGenerator itself.

Development links

Metadata

Release files for unogenerator 1.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for unogenerator 1.5.0
File Size Uploaded
unogenerator-1.5.0.tar.gz 867.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for unogenerator 1.5.0
File Interpreter ABI Platform
unogenerator-1.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 1.8 MB

Release files / unogenerator-1.5.0.tar.gz

Download URL unogenerator-1.5.0.tar.gz
Size 867.1 kB
Tags Source
SHA-256 checksum
How to use checksums
d1b76a58a6ccef7a514827b7f1c96f8f503a7efbe15435a569b9ed7446c1bd7e
BLAKE2b-256 checksum
How to use checksums
5cb30fd62042fd2422297f52c81d32a4061421d07b7b393b87aaf33101d0c4d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.1 CPython/3.14.6 Linux/7.1.6-gentoo

Release files / unogenerator-1.5.0-py3-none-any.whl

Download URL unogenerator-1.5.0-py3-none-any.whl
Size 890.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
02d31bcf097d302fee63532e1fa4e6276e72b1d0b02db5951fb97da94899fd92
BLAKE2b-256 checksum
How to use checksums
0ca9bbfeab9dfd07973c3bcaac7e06a2a47ee377857c3a5dd405706c799517d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.1 CPython/3.14.6 Linux/7.1.6-gentoo

Release history Release notifications | RSS feed

This release

1.5.0 This release

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.41.0

2 release files

0.40.0

2 release files

0.37.0

2 release files

0.36.0

2 release files

0.33.0

2 release files

0.32.0

2 release files

0.31.0

1 release file

0.30.0

1 release file

0.29.0

1 release file

0.28.0

1 release file

0.27.0

1 release file

0.26.0

1 release file

0.25.0

1 release file

0.24.0

1 release file

0.23.0

1 release file

0.22.0

1 release file

0.21.0

1 release file

0.20.0

1 release file

0.19.0

1 release file

0.18.0

1 release file

0.17.0

1 release file

0.16.0

1 release file

0.15.0

1 release file

0.14.0

1 release file

0.13.0

1 release file

0.12.0

1 release file

0.11.0

1 release file

0.10.0

1 release file

0.9.0

1 release file

0.8.0

1 release file

0.7.0

1 release file

0.6.0

1 release file

0.5.0

1 release file

0.4.0

1 release file

0.3.0

1 release file

0.2.0

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page