Short answer: python-pptx cannot create animations or slide transitions. There is no animation API, and none is planned. The library covers shapes, text, tables, and charts; PowerPoint's animation timeline (<p:timing>in the slide XML) has no object model in python-pptx at all. That's the answer to "python-pptx animation support" — but it is not the end of the story, because three workarounds cover most real cases.
1. Animations authored in a template survive
python-pptx round-trips XML it doesn't understand. Open a deck whose slides already carry animations, modify text and shapes, save — the <p:timing> tree is preserved untouched. This is the workaround that ships in production:
from pptx import Presentation
# template.pptx: a designer authored the entrance animations in PowerPoint
prs = Presentation("template.pptx")
slide = prs.slides[0]
# Fill in content — the slide's animations are preserved on save
slide.shapes[0].text_frame.text = "Q3 results"
prs.save("out.pptx")The constraint: animations target shapes by ID, so modify the animated shapes rather than deleting and re-adding them — a new shape gets a new ID and the animation pointing at the old one goes dead.
2. Progressive disclosure: fake it with slides
The most common animation request — bullets or blocks appearing one by one — doesn't need animation at all. Generate one slide per reveal step; in present mode, advancing slides plays exactly like an entrance build. This is fully scriptable, deterministic, and survives every converter and viewer ever written:
(The free preview shows slide 1 — render the full deck in the playground to page through the build.)
3. Raw XML injection — possible, rarely worth it
Because python-pptx exposes every element's lxml node, you can hand-build a <p:timing> tree and append it to slide._element — people have made single-shape entrance effects work this way. Honestly assessed: the timing schema is one of the most intricate parts of OOXML (behaviors, time nodes, trigger chains), there is no validation, and a malformed tree makes PowerPoint silently drop all animation on the slide. If you need one fade-in on one shape, copy the XML from a hand-authored deck and template it; beyond that, use workaround 1.
Transitions: same story
Slide transitions (<mc:AlternateContent> / <p:transition>) have no API either, and the same two workarounds apply: author them in the template, or inject XML. Template-authored transitions survive open/save just like animations do.
The wider boundary
Animations are one of three things python-pptx structurally can't do — the others are rendering slides to images (it writes XML; seeing a slide means opening PowerPoint) and PDF export. We catalogued all eleven production limitations in python-pptx limitations we solved. For the rendering half specifically: paste your code into the free python-pptx preview and see the slide in about a second, or run it through SlideForge's code mode for the .pptx plus PDF and full-resolution image export.