Developer tools

power-pptx

Active development
On this page

The problem

Generating a presentation is easy until text overflows, shapes collide or the deck needs editing in PowerPoint. A useful authoring library needs to understand space as well as content.

What I’m building

power-pptx is a maintained fork of Steve Canny’s python-pptx. It creates, reads and updates editable .pptx files in Python, without requiring PowerPoint to be installed.

Content passes through layout and lint checks to become an editable PowerPoint deck

Layout-aware authoring

Text fitting uses Pillow font measurements, with PowerPoint auto-sizing as a fallback. Slide linting, automatic fixes and tidy operations help catch layout problems. Bounding-box geometry and diagram recipes support more structured authoring.

The library can turn database results, analytics, JSON or model-generated content into a deck. The output remains editable, so automation supports the final presentation workflow.

Explore

The repository, documentation and Python package cover the authoring API and examples. The power_pptx import keeps the fork separate from upstream python-pptx.

From content to a finished deck

The authoring workflow starts with a template or a new presentation, then places editable text, pictures, tables, charts and diagrams. Layout checks run before the .pptx is saved. Keeping those objects native to PowerPoint lets someone revise the wording, rearrange a diagram or update a chart after generation.

The fork adds a BBox geometry object for splitting a region, applying insets and laying out grids. Higher-level recipes cover pipelines, hub-and-spoke diagrams, cycles, decision trees and comparison columns. These are useful when the input describes relationships but does not specify every shape’s coordinates.

from power_pptx import Presentation, BBox
from power_pptx.diagrams import horizontal_pipeline

presentation = Presentation()
slide = presentation.slides.add_slide(presentation.slide_layouts[5])
slide.shapes.title.text = "A small pipeline"
horizontal_pipeline(
    slide, BBox.from_inches(0.5, 2.5, 9, 2.2),
    steps=["Collect", "Check", "Present"],
    accent="#0B5CFF",
)
slide.tidy()
presentation.save("pipeline.pptx")

Checking the output

The library combines font measurements, renderer-side auto-sizing and slide linting. A whole-deck audit reports issues such as empty slides, broken pictures and unusually large images. These checks support the authoring loop; a visual preview remains useful for assessing balance, hierarchy and readability.

Slide thumbnails use LibreOffice when configured. This is a separate rendering dependency; generating the editable deck itself does not require PowerPoint or LibreOffice.

Where to start

The getting-started guide introduces the API. The space-aware authoring guide explains layout, and the coding-agent guide describes the bundled skill. Upstream attribution and the MIT licence are retained in the repository.