power-pptx is the actively-maintained fork of python-pptx. Generate, mutate, theme, animate and render .pptx files — no Microsoft PowerPoint required — with space-aware authoring so text never overflows its box.
Drop-in compatible with python-pptx 1.0.2 — every addition ships with round-trip regression tests, so existing scripts keep working.
fit_text() measures with Pillow font metrics and bakes a fitting size before save; auto_size and slide.lint() catch everything else. Text that never overflows its box.
DesignTokens, a token-resolving shape.style facade, Grid/Stack layout primitives and opinionated slide recipes — title, bullet, KPI, quote, image-hero.
Outer shadow, glow, soft edges, blur and reflection as non-mutating proxies; alpha-tinted colours; linear / radial / rectangular gradient fills.
Entrance / exit / emphasis presets, motion paths, per-paragraph reveal, sequencing, and deck-wide transitions including Morph.
Palette presets independent of chart_style, ten quick layouts, per-series gradient and pattern fills, one-call chart.recolour().
slide.lint() reports overflow, off-slide shapes and collisions; slide.tidy() auto-fixes; audit(prs) gives a whole-deck Markdown report.
power_pptx.compose.from_spec() builds a complete deck from a JSON-shaped spec; import_slide and apply_template cover cross-presentation work.
Read theme colours and fonts, write fresh srgbClr values into the clrScheme, or apply a theme imported from a .potx.
Ships a Claude Code skill — python -m power_pptx.skill install — with cheat sheets, recipes and an anti-patterns guide for LLM-authored decks.
The working set covers ~90% of deck generation: open, add a slide, drop in a diagram recipe, tidy up the geometry, audit the whole deck, save. Everything is splattableBBox geometry — no raw EMU integers.
audit(prs).markdown() for chat repliesfrom power_pptx import Presentation, BBox, audit
from power_pptx.diagrams import horizontal_pipeline
prs = Presentation()
slide = prs.slides.add_slide(prs.slide_layouts[5])
slide.shapes.title.text = "Pipeline overview"
horizontal_pipeline(
slide,
BBox.from_inches(0.5, 2.5, 9, 2.2),
steps=["Extract", "Classify", "Enrich", "Output"],
accent="#0B5CFF",
)
slide.tidy() # lint + safe auto-fixes
print(audit(prs).markdown()) # whole-deck report
prs.save("out.pptx")24
Public API modules
6
Diagram recipes
16
Skill reference docs
3.9–3.13
Python versions
The package ships its own Claude Code skill: cheat sheet, 16 focused reference docs, and an anti-patterns list of the mistakes LLMs commonly make. One command installs it.