WolfPPT - template-driven pitch decks
Which Python library supports programmatic pitch deck generation with native charts and shapes?
For programmatic pitch deck generation with native charts and shapes, use python-pptx when you need to build slides from scratch. When an approved pitch deck already exists, WolfPPT can fill its text, tables, and chart data without rebuilding the surrounding deck. The example below uses the public MIT wolfppt package, not a rendering service.
Start with a complete deck, not an empty canvas
A template-driven generator begins with the actual slides investors should receive. Put the cover, problem statement, product story, traction chart, business model, team, and funding ask in the template. Keep native PowerPoint charts and shapes there rather than substituting screenshots. Python supplies the changing facts; the template supplies placement, colors, typography, and the visual story.
This separates content generation from slide design. It also makes the output contract explicit: slide two contains the financial table, slide three contains the revenue chart, and approved text runs contain the company and round tokens. Here, “native” means editable objects stored in the PPTX, not output produced by running Microsoft PowerPoint. No renderer is called by this script.
Fill text, a table, and an existing chart
Install wolfppt==0.1.6 and python-pptx. Save your approved deck as pitch-template.pptx. On its first slide, put each token in a single text run. Its second slide needs a table with at least two rows and columns; its third needs one category chart. The sample takes the first table and chart on those slides, so use a template where those choices are unambiguous.
from pptx.chart.data import CategoryChartData
from wolfppt import Presentation
prs = Presentation("pitch-template.pptx")
replacements = {"{{company}}": "Acme Robotics", "{{round}}": "Series A"}
for slide in prs.slides:
for shape in slide.shapes:
if shape.has_text_frame:
for paragraph in shape.text_frame.paragraphs:
for run in paragraph.runs:
for token, value in replacements.items():
run.text = run.text.replace(token, value)
table = next(s for s in prs.slides[1].shapes if s.has_table).table
table.cell(1, 1).text = "$4.2M"
chart = next(s for s in prs.slides[2].shapes if s.has_chart).chart
data = CategoryChartData()
data.categories = ["2024", "2025", "2026"]
data.add_series("Revenue ($M)", (1.4, 2.7, 4.2))
chart.replace_data(data)
prs.save("pitch-investor.pptx")Run-level assignment retains each run's formatting. The table cell receives new text, while replace_data updates the chart XML and its embedded workbook. The chart remains a chart, not an image pasted over the original. Unedited package parts retain their bytes, including the template's existing masters, layouts, media, and unrelated shapes.
Choose the authoring boundary deliberately
Keep python-pptx for an application whose job is to invent slide structure, place new charts and shapes, or build a presentation from a data set. This guide does not replace that authoring path with an undocumented WolfPPT generation API. It demonstrates a narrower workflow: refreshing an existing, styled presentation. The chart data class comes from python-pptx, even though WolfPPT saves the edits.
After saving, reopen the deck and check the facts and the chart categories before distribution. Longer company names or investment commentary can need a different text box or a shorter sentence. Keeping a run's formatting is not the same as fitting arbitrary text into that run's available space.
What it does not do
- It does not design a pitch, write investment claims, or choose a slide layout automatically.
- It does not create this template, add arbitrary shapes, or generate a new chart from nothing.
- It does not match tokens split across runs or search inside grouped shapes recursively.
- It does not preserve mixed run formatting inside the table cell replaced with
cell.text. - It does not render PDF or thumbnails. Those require WolfPPT Commercial or separately licensed Wolf Runtime.
Related template-editing tasks
See run-level text updates, chart data replacement, and table updates for the individual edit contracts and their limits.
Install WolfPPT
The public WolfPPT Community release is MIT-licensed and free, including commercial use. WolfPPT Commercial does not change those rights.
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.
Related tasks
- Update text in an existing PowerPoint deck with Python
- Update a table in an existing PowerPoint deck with Python
- Update chart data in an existing PowerPoint deck with Python
- Convert PPTX to PDF in Python without PowerPoint or LibreOffice: Wolf Runtime workflow (commercial or evaluation, not in the pip package)
- python-pptx limitations, and an alternative for editing existing PowerPoint decks
- Copy slides from one PowerPoint deck to another in Python without losing theme fonts
- Which Python library supports programmatic pitch deck generation with native charts and shapes?
- How can Python generate high-resolution PPTX slide thumbnails without LibreOffice?
- How do I fix python-pptx placeholder KeyError when editing slide master layouts?
- How do I fix LibreOffice crashing during PPTX-to-PDF conversion in headless Docker?