rtflite 
Lightweight RTF composer for Python.
Specializes in precise formatting of production-quality tables and figures. Inspired by r2rtf.
Installation
You can install rtflite from PyPI:
pip install rtflite
Or install the development version from GitHub:
git clone https://github.com/pharmaverse/rtflite.git
cd rtflite
python3 -m pip install -e .
Optional dependencies - DOCX support
Some features in rtflite require additional dependencies. To install rtflite with DOCX assembly support:
pip install rtflite[docx]
To add rtflite as a dependency with DOCX support for projects using uv:
uv add rtflite --extra docx
For rtflite developers, sync all optional dependencies with:
uv sync --all-extras
Optional dependencies - LibreOffice
rtflite can convert RTF documents to PDF and DOCX using LibreOffice. To enable this feature, install LibreOffice (free and open source, MPL license).
See the converter setup guide for detailed instructions.
Contributing
We welcome contributions to rtflite. Please read the rtflite Contributing Guidelines to get started.
All interactions within rtflite repositories and issue trackers should adhere to the rtflite Contributor Code of Conduct.
License
This project is licensed under the terms of the MIT license.