skillfed

pyexiv2

Read and write image metadata, including EXIF, IPTC, XMP, ICC Profile.

pyexiv2 v2.16.0 80.2K downloads/30d#14,304 on PyPI246
Copyleft license GPLv3 Active released

What it is and what it does

pyexiv2 is a Python binding to the C++ Exiv2 library that lets you read and write image metadata standards—EXIF, IPTC, XMP, and ICC Profile—directly from Python. It supports opening images by file path or from raw bytes, handles Unicode in both paths and metadata, and works on 64-bit Linux, macOS, and Windows with CPython ≥3.8.

The library is built on pybind11 and exposes the full metadata capabilities of Exiv2, including support for many image formats. However, it has two important limitations: it cannot read images larger than 2GB or modify images larger than 1GB, and it is not thread-safe because the underlying C++ code uses global state.

Use it for:

  • Extract EXIF data (camera settings, GPS, timestamps) from photos for cataloging or analysis.
  • Batch-edit image metadata (tags, copyright, keywords) across a photo library.
  • Read or strip ICC color profiles from images for color-management workflows.
  • Embed or modify XMP metadata in images for digital asset management systems.
  • Validate or repair IPTC metadata in press photos or archival images.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

pyexiv2 reads and writes image metadata (EXIF, IPTC, XMP, ICC Profile) from files or bytes, wrapping the C++ Exiv2 library via pybind11.

Yes, if your project is open-source or can accept GPLv3 copyleft. pyexiv2 is actively maintained, has no known vulnerabilities, and offers comprehensive metadata support across major image formats and platforms. Install friction is moderate due to prebuilt wheels; no source build required for standard platforms. Not suitable for proprietary applications.

Install

pyexiv2 on PyPI

pip

pip install pyexiv2

uv

uv add pyexiv2

poetry

poetry add pyexiv2

Installing pyexiv2

Before you install

Medium install friction: prebuilt wheels available for CPython 3.8 and later on Linux, macOS, and Windows, but no source distribution listed. Active maintenance with a release 12 days ago.

License in practice

GPLv3 copyleft license: any application that links or distributes pyexiv2 must also be open-source under a compatible license. Proprietary or closed-source projects cannot use this package.

Quickstart

pip install pyexiv2

import pyexiv2

image = pyexiv2.Image('photo.jpg')
image.read()
print(image.exif_dict)

Requires CPython ≥3.8. Not thread-safe due to global state in the underlying C++ library. Cannot read images larger than 2GB or modify images larger than 1GB.

Verify before relying

  • Whether prebuilt wheels are the only distribution method or if source builds are possible on unsupported platforms.
  • Performance characteristics and typical use-case latency for metadata operations on standard image sizes.

Package facts

License GPLv3 (copyleft)
Python support supports the current Python release (>=3.8)
Install friction medium — platform-specific wheel
Runtime dependencies none
Maintenance actively maintained — 12 days since the last release
Last repo commit
First released
Downloads 80,241/month — #14,304 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pyexiv2-2.16.0-cp310-none-macosx_15_0_arm64.whl; pyexiv2-2.16.0-cp310-none-macosx_15_0_x86_64.whl; pyexiv2-2.16.0-cp310-none-manylinux2014_aarch64.whl; pyexiv2-2.16.0-cp310-none-manylinux2014_x86_64.whl; pyexiv2-2.16.0-cp310-none-win_amd64.whl; pyexiv2-2.16.0-cp311-none-macosx_15_0_arm64.whl; pyexiv2-2.16.0-cp311-none-macosx_15_0_x86_64.whl; pyexiv2-2.16.0-cp311-none-manylinux2014_aarch64.whl; pyexiv2-2.16.0-cp311-none-manylinux2014_x86_64.whl; pyexiv2-2.16.0-cp311-none-win_amd64.whl; pyexiv2-2.16.0-cp312-none-macosx_15_0_arm64.whl; pyexiv2-2.16.0-cp312-none-macosx_15_0_x86_64.whl; pyexiv2-2.16.0-cp312-none-manylinux2014_aarch64.whl; pyexiv2-2.16.0-cp312-none-manylinux2014_x86_64.whl; pyexiv2-2.16.0-cp312-none-win_amd64.whl; pyexiv2-2.16.0-cp313-none-macosx_15_0_arm64.whl; pyexiv2-2.16.0-cp313-none-macosx_15_0_x86_64.whl; pyexiv2-2.16.0-cp313-none-manylinux2014_aarch64.whl; pyexiv2-2.16.0-cp313-none-manylinux2014_x86_64.whl; pyexiv2-2.16.0-cp313-none-win_amd64.whl

License :: OSI Approved :: GNU General Public License v3 (GPLv3)Operating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: POSIX :: Linux

Tags

read write image metadataexif iptc xmp extractionimage metadata editorphoto metadata libraryexiv2 python binding
image-metadataexif-iptc-xmpmedia-processing

More Graphics packages