In this tutorial, we will generate personalized student report presentations using self hosted Presenton’s API and a Python script. This tutorial extends Generate a PPT via API in 5 Minutes and shows you how to automate the creation of personalized student report presentations from a CSV file using Python. So, do check it before continuing with this and make sure you have Presenton running locally or any server and you are able to generate presentations with it.Documentation Index
Fetch the complete documentation index at: https://docs.presenton.ai/llms.txt
Use this file to discover all available pages before exploring further.
1. Prepare Your CSV File
Save your student data asstudents.csv:
2. Install Python Requirements
You’ll need therequests and pandas libraries:
3. Write the Python Script
Let’s build the script step by step.a. Import Libraries
b. Creat presentations directory
c. Load the CSV
d. Define a Function to Build the Prompt
e. Loop Over Each Student and Generate a Presentation
presentations directory.
Download complete code from github.
4. Run the Script
Save your script asgenerate_reports.py and run:
5. How It Works
- The script reads each row from your CSV.
- It builds a detailed prompt for Presenton’s API (see API Reference).
- It sends a POST request to generate a presentation for each student.
- The API returns a download path for each generated PPTX.
- The presentation file is downloaded and saved in
presentationsfolder.
6. Next Steps
- You can customize the prompt or number of slides as needed.
- For more on API options, see Generate a PPT via API in 5 Minutes.
- To edit created presentation you can follow Edit Custom Presentation Using API.
- For advanced configuration (e.g., using Ollama or GPU), see Environment Variables, Using GPU, and Using Ollama Models.
Need help? See the full documentation or open an issue on GitHub.