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
presentations
folder.
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.