Create Presentation Python
This guide shows how to create presentation python using Aspose.Slides FOSS for Python.
Prerequisites
| Requirement | Detail |
|---|---|
| Runtime | Python |
| Package | aspose-slides-foss |
| Install | See the Installation guide |
Steps
- Install the package:
pip install aspose-slides-foss- Use the
Presentationclass for the core operation.
import aspose.slides_foss as slides
from aspose.slides_foss.export import SaveFormat
# Create a blank presentation from scratch (starts with one empty slide)
with slides.Presentation() as prs:
prs.save("new.pptx", SaveFormat.PPTX)Tips and Best Practices
- Check the API reference for the latest class signatures
- Handle file I/O exceptions when reading or writing files
- Dispose of resources properly after use