python-pptx icon indicating copy to clipboard operation
python-pptx copied to clipboard

Presentation object from URL

Open auroramariatumminello opened this issue 1 year ago • 1 comments

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!

auroramariatumminello avatar Apr 06 '23 07:04 auroramariatumminello

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.)

MartinPacker avatar Apr 06 '23 09:04 MartinPacker