OPF
Browse docs
On this page

OPF vs python-pptx

Use python-pptx when you want to create, read or update PowerPoint files directly in Python. Use OPF when Python or an LLM should emit schema-valid JSON that you can review and export to PPTX or PDF. Call the Node CLI from Python through subprocess.

When to use which

Use OPF when

  • An agent or program should write a schema-valid JSON deck before export.
  • You want to review JSON, Markdown or YAML source in git and produce PPTX and PDF locally.

Use python-pptx when

  • Your application should read and update existing PPTX files through a Python object model.
  • You want direct Python control over slides, shapes, placeholders, tables and charts.

Features and trade-offs

Other-tool claims link to the official sources listed below. Check export results on your own decks; this is a workflow comparison, not a fidelity benchmark.

FeatureOPFpython-pptx
Authoring interfaceJSON document checked against the OPF schemaPython library for creating, reading and updating PPTX [1]
Existing PowerPoint filesPPTX import goes through normalization; it is not losslessDocuments round-tripping Open XML presentations, including elements it does not yet manipulate [1]
Content editingStructured slide content, followed by validation and exportShapes, placeholders, tables and charts through Python [1]
Runtime and OfficeNode 22+ CLI, called from Python; no Office installRuns on Python-capable platforms, including macOS and Linux; no PowerPoint install [1]

A local OPF workflow

Save your deck as deck.opf.json. In a project with the CLI and export packages installed (first local run), validate it before writing the PowerPoint and PDF files:

Validate, then export
npx opf validate deck.opf.json --fail-on warning
npx opf convert deck.opf.json deck.pptx
npx opf convert deck.opf.json deck.pdf

Keep the OPF source in git. Inspect the findings and rendered output before handing over the files. The CLI guide and conversion guide document these commands and import limits.

FAQ

When should I choose python-pptx?

Use python-pptx for direct Python creation, reading and updates of PPTX files, especially when the PowerPoint object model is the interface you want.

Does generating PowerPoint in Python require PowerPoint installed?

Neither the OPF CLI workflow nor python-pptx requires a PowerPoint installation. OPF also requires Node 22 or later.

Is there an OPF PyPI package?

No. Build or parse OPF JSON in Python, save it to a file and call the Node CLI through subprocess. An LLM can return the same JSON; validate it before exporting.

Sources

Official documentation checked November 22, 2026. Product behavior can change.

  1. python-pptx documentation and feature list

OPF: CLI and Node conversion reference; conversion commands and limits.