pyexiv2
Read and write image metadata, including EXIF, IPTC, XMP, ICC Profile.
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 pyexiv2uv
uv add pyexiv2poetry
poetry add pyexiv2Installing 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
Tags
More Graphics packages
Pillow adds image processing capabilities to…
permissive · top 100 on PyPI
fonttoolsfonttools manipulates font files in multiple…
permissive · top 1,000 on PyPI
matplotlib-inlineEnables matplotlib figures to display inline…
permissive · top 1,000 on PyPI
pymupdfPyMuPDF extracts, renders, converts, and…
agpl · top 1,000 on PyPI
pypdfium2pypdfium2 is a Python binding to PDFium that…
permissive · top 1,000 on PyPI
altairAltair is a declarative Python library for…
permissive · top 1,000 on PyPI
PyExifToolPyExifTool is a Python wrapper that…
copyleft · top 15,000 on PyPI
python-xmp-toolkitRead and write XMP metadata in image and…
permissive · top 15,000 on PyPI
piexifPiexif reads, writes, and manipulates EXIF…
permissive · top 5,000 on PyPI
exifRead, modify, and write EXIF metadata in image…
permissive · top 15,000 on PyPI
ExifReadExtracts Exif metadata from digital image files…
unclear · top 5,000 on PyPI
imagesizeReads image file headers to extract dimensions,…
permissive · top 1,000 on PyPI
tifffileRead and write TIFF files and TIFF-like formats…
permissive · top 1,000 on PyPI
pillow-heifpillow-heif adds HEIF/HEIC image format support…
copyleft · top 5,000 on PyPI
ccimportccimport builds Python C++ bindings on-the-fly…
permissive · top 15,000 on PyPI
pybind11pybind11 is a header-only C++ library that…
permissive · top 1,000 on PyPI