PyExifTool provides a convenient Python interface to Phil Harvey's ExifTool, a powerful command-line application for reading, writing, and editing metadata in a wide variety of file formats. The current version is 0.5.6, and it maintains an active release cadence with new features and improvements.
pip install pyexiftoolVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to instantiate ExifTool using a context manager and read metadata from an image file. It includes a fallback to create a dummy file for immediate execution, but real EXIF data requires a valid image. It also highlights the requirement for the `exiftool` command-line utility.
Review the updated documentation (sylikc.github.io/pyexiftool) and adapt your code to the new API (e.g., `get_metadata` instead of `get_tag`). Ensure your Python and exiftool versions meet the requirements.
Install `exiftool` via your operating system's package manager (e.g., `sudo apt install libimage-exiftool-perl` on Debian/Ubuntu, `brew install exiftool` on macOS) or download from `exiftool.org`.
If you wish to use `ujson` for performance, import `ujson` and then call `ExifTool.set_json_loads(ujson.loads)` after instantiation or globally.
Upgrade your Python environment to Python 3.6 or newer if you plan to use PyExifTool v0.5.0 or later.
Update exception handling blocks to catch the new error class names.
Review calls to `ExifToolHelper` methods and either handle `ExifToolExecuteError` or explicitly disable the `check_execute` parameter if old behavior is desired.