WolfPPT - existing deck edits
Update text in an existing PowerPoint deck with Python
Keep the deck your team already maintains and change only the words that move each month. WolfPPT opens the existing .pptx, applies run-level text edits through a python-pptx-style API, and saves through a native engine that leaves unedited package parts untouched.
Replace a placeholder and keep its formatting
from wolfppt import Presentation
prs = Presentation("monthly_review.pptx")
for slide in prs.slides:
for shape in slide.shapes:
if not shape.has_text_frame:
continue
for paragraph in shape.text_frame.paragraphs:
for run in paragraph.runs:
if "{{month}}" in run.text:
run.text = run.text.replace("{{month}}", "September")
prs.save("monthly_review_updated.pptx")Assigning to run.textkeeps that run's font, size, color, and bold settings. The saved copy changes the edited slide XML only; masters, layouts, media, charts, and notes you did not touch keep their original bytes.
When to use WolfPPT and when to use python-pptx
- Use WolfPPT when a recurring deck already exists and a pipeline should change approved text inside it while the rest of the file stays as it was.
- Use python-pptx when you are generating a new deck from code, or when you need an API surface that the WolfPPT facade does not cover yet.
- The facade mirrors python-pptx names such as
Presentation,slides,shapes,text_frame, andruns, so an existing edit script usually needs only its import changed. Check the compatibility matrix for each call you rely on.
Limitations
- A placeholder split across several runs appears as separate run texts; the loop above matches a placeholder only when one run holds all of it.
- Setting
shape.textrewrites the whole text body as newline-separated paragraphs. Use run-level assignment when formatting inside the shape must stay intact. - The facade covers a documented subset of python-pptx, and mutation guards refuse unsafe edits instead of writing them.
Install WolfPPT
The public WolfPPT release is MIT-licensed and free, including commercial use.
pip install wolfpptPyPI wheels cover CPython 3.11 to 3.14 on Linux x86_64 and aarch64 and on macOS arm64. Source, tests, and the full facade reference live at github.com/wolfiesch/wolfppt-oss.