Create, read, and update PowerPoint 2007+ (.pptx) files.
Actively maintained. Last release 2 months ago, commits in 5 of the last 26 weeks. A safe choice.
pip install paper-pptxAn import-compatible, agent-safe fork of python-pptx for creating and editing PowerPoint presentations without silent corruption.
paper-pptx is an import-compatible hard fork of python-pptx for creating and editing PowerPoint (.pptx) presentations. It keeps the pptx import name and upstream object model, and adds structure-aware operations and machine-readable results for automated workflows.
Installation
Use an activated virtual environment.
python -m pip uninstall -y python-pptx paper-pptx
python -m pip install paper-pptx
python -m paper_pptx_doctor
Both distributions provide the pptx import package. Do not install python-pptx and paper-pptx in the same environment.
To return to python-pptx, run the uninstall line above again, then python -m pip install python-pptx.
Quick start
Create a presentation and update its text without flattening untouched run formatting:
from pptx import Presentation
from pptx.edit import replace_text
prs = Presentation()
slide = prs.slides.add_slide(prs.slide_layouts[0])
slide.shapes.title.text = "FY25 plan"
prs.save("deck.pptx")
prs = Presentation("deck.pptx")
result = replace_text(prs, "FY25", "FY26")
prs.save("deck-v2.pptx")
print(result.replacements) # 1
replace_text returns a machine-readable result and refuses unsupported edits before changing the presentation.
Documentation
Read the paper-pptx documentation.