ExifTool Forum

ExifTool => Developers => Topic started by: AJ on June 14, 2022, 05:39:52 PM

Title: Python - Extracting EXIF Information
Post by: AJ on June 14, 2022, 05:39:52 PM
I'm building an application with students and one of the features we wanted to implement is the ability to view Exif information. They are coding the application in Python and they are only able to retrieve minimal Exif information. They mentioned there are no Python resources that allows them to extract the full Exif data or integrate the Exiftool functionality. Any advice on how to intergrade the Exiftool within a Python application would be greatly appreciated.
Title: Re: Python - Extracting EXIF Information
Post by: StarGeek on June 14, 2022, 09:27:20 PM
Have you taken a look at PyExifTool (https://smarnach.github.io/pyexiftool/) (Github repo (https://github.com/smarnach/pyexiftool)), a python wrapper for exiftool?

I believe it uses the -stay_open option (https://exiftool.org/exiftool_pod.html#stay_open-FLAG) and -@ (Argfile) option (https://exiftool.org/exiftool_pod.html#ARGFILE), which keep exiftool running in the background so commands can be sent and data extracted without having to run exiftool once for every command.  Because exiftool's biggest performance hit is it's startup time, it is not recommend to run it once for every command.  See Common Mistake #3 (https://exiftool.org/mistakes.html#M3).
Title: Re: Python - Extracting EXIF Information
Post by: AJ on June 15, 2022, 05:36:06 PM
Thank you for the reply. We're familiar with the PyExifTool. Yes, that's one of the things they were concerned with; running command line. I will let them know what you mentioned about running it in the background.

Their main concern is that there isn't a suitable Python library that integrates with web applications to extract the full Exif data and building one from scratch with the limited time they have is not possible.  I should have mentioned that the application is a web application.