scanny / python-pptx

Create Open XML PowerPoint documents in Python
MIT License
2.28k stars 502 forks source link

Presentation object from URL #881

Open auroramariatumminello opened 1 year ago

auroramariatumminello commented 1 year ago

Dear all,

I'm trying to create a Presentation object starting from a URL pointing directly to a pptx file. Is it possible? I haven't found anything similar in your documentation, but it would be truly helpful. By trying with

from pptx import Presentation
Presentation(<URL>)

I get

PackageNotFoundError: Package not found at <URL>

Thank you!

MartinPacker commented 1 year ago

I think you'd have to get the contents of the URL and save them to a (temporary) file first. (I assume your use case is to pull a presentation from the web and then amend it using python-pptx.)