Aspose.Slides for Python via .NET is a class library that enables applications to read, write, manipulate, and convert PowerPoint presentations (PPT, PPTX, PPS, POT, PPSX, etc.) without requiring Microsoft PowerPoint. Version 26.4.0 supports Python 3.5 to 3.13. Releases occur monthly.
pip install aspose-slidesVerified import paths — ran on the pinned version, not inferred.
Creates a simple presentation with one slide, adds a rectangle with text, and saves as PPTX.
with slides.Presentation() as pres: ... or pres = slides.Presentation(); ...; pres.dispose()
Perform import once at module level, not inside functions/loops.
Update imports: from aspose.slides.export import SaveFormat instead of from aspose.slides import SaveFormat.
Use pres.slides[0] to access slides; iterate with for slide in pres.slides:
shape = slide.shapes.add_auto_shape(slides.ShapeType.RECTANGLE, left, top, width, height)