← Back to all sparks
R

rtflite

ANALYTICS
Velocity0.0

Lightweight RTF composer for Python. Specializes in precise formatting of production-quality tables and figures.

rtflite stopped being an RTF writer and became the conversion layer for clinical table output.

clinical-reportingpythondocument-conversionrtfpharmaverse
Current state
rtflite generates the RTF tables clinical study reports are built from, a Python answer to the R tooling that has owned this niche. Over one dense month it grew a full export path: DOCX in 2.2.0, DOCX concatenation in 2.3.0, a configurable LibreOffice converter in 2.4.0, and HTML plus PDF in 2.5.0. The three releases since have been documentation, test infrastructure, and typing work — the feature push has stopped and consolidation has started.
Where it's heading
Every format addition routes through the same LibreOffice converter rather than a per-format implementation, and 2.4.0's breaking change made that converter an injectable object you can configure and reuse. That is the shape of a package expecting to run inside a pipeline that produces hundreds of tables, not one that converts a document at a time. The recent quiet — snapshot tests moved onto `pytest-r-snapshot`, docs migrated, pandas and pyarrow dropped from dev dependencies — reads as work to stay dependency-light while the surface stabilizes.
Prediction
With the export matrix filled in and three consecutive infrastructure-only releases, the next substantive change is most likely on the input side — table construction and pagination — since `page_by` and `subline_by` are the only feature area still generating bug reports in these notes.

Recent moves

  1. 4mo ago

    Multi-section body typing tightened; pandas dropped from dev deps

    Maintenance across three fronts: `rtf_body` gets a proper union type with a validator so single-section documents fail loudly on multi-body input instead of erroring downstream, and pandas and pyarrow leave the development dependencies. Internal work with no change to what the package produces.

    View source ↗
  2. 7mo ago

    API reference renders Pydantic field metadata

    Documentation-only release — mkdocstrings now renders Pydantic field metadata via griffe-pydantic, a private attribute declaration fixes a static-mode render error, and a Code Wiki link joins the README. No functional change.

    View source ↗
  3. 7mo ago

    Documentation site migrated to Zensical

    A documentation site migration and nothing else. Part of the infrastructure cleanup that has occupied the releases since the export work finished.

    View source ↗
  4. 7mo ago

    Snapshot tests moved to pytest-r-snapshot

    Test infrastructure work — RTF snapshot tests migrate to `pytest-r-snapshot` with fixtures under the standard `tests/__r_snapshots__/` location, retiring the bespoke fixture generation workflow. Invisible to users, but snapshot fidelity is how this package proves its RTF output has not drifted.

    View source ↗
  5. 7mo ago

    HTML and PDF export complete the output matrix

    ⚡ SPARK

    The release that finishes the month-long conversion push started by `write_docx`: RTF tables can now be emitted as HTML and PDF through the same LibreOffice path. It changes what rtflite is for — output formats consumers actually read, not just the intermediate format a submission toolchain expects.

    View source ↗
  6. 7mo ago

    LibreOffice conversion becomes an injectable converter object

    Breaking change with a clear rationale: `executable_path` leaves `write_docx()` in favour of passing a configured `LibreOfficeConverter` instance, which can then be reused across many conversions. Restructuring done a release before HTML and PDF arrived — the converter had to become an object before three formats could share it.

    View source ↗