skillfed

piexif

To simplify exif manipulations with python. Writing, reading, and more...

piexif v1.1.3 2.8M downloads/30d#2,874 on PyPI391
Permissive license MIT DORMANT released

What it is and what it does

Piexif is a pure-Python library for reading, writing, and manipulating EXIF metadata embedded in JPEG and WebP image files. It exposes a small, focused API: load() to extract EXIF as a dictionary, dump() to serialize it back to bytes, insert() to embed EXIF into an image, remove() to strip it, and transplant() to copy EXIF from one image to another. Because it has no compiled dependencies and no runtime requirements, it runs on any Python interpreter—CPython, PyPy, IronPython—and any operating system.

The library is designed for straightforward metadata tasks: inspecting camera settings, GPS coordinates, and timestamps; modifying resolution or orientation tags; or removing sensitive metadata before sharing photos. It integrates naturally with PIL/Pillow for image processing workflows. The API is intentionally minimal (five functions) and the data model is a nested dictionary keyed by EXIF IFD sections ("0th", "Exif", "GPS", "1st"), making it easy to iterate and edit tags without learning a complex abstraction.

Use it for:

  • Extract and inspect EXIF metadata from photos to read camera model, GPS location, or timestamp.
  • Remove sensitive EXIF data (location, device info) before uploading photos to the web.
  • Modify image resolution or orientation tags in EXIF and re-embed them in JPEG files.
  • Copy EXIF metadata from one photo to another (e.g., transplant GPS data between images).
  • Build a photo metadata editor or batch processing tool that reads and updates EXIF fields.

Worth the install?

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

Piexif reads, writes, and manipulates EXIF metadata in JPEG and WebP images using pure Python with no compiled dependencies.

Yes. Piexif is a stable, zero-dependency pure-Python library for EXIF manipulation with no known vulnerabilities and broad Python version support. Its dormant maintenance is a minor concern for edge cases with new camera formats, but the core EXIF spec is stable and the library is well-suited for straightforward metadata tasks. Install it if you need to read or edit EXIF in JPEG or WebP files without external dependencies.

Install

piexif on PyPI

pip

pip install piexif

uv

uv add piexif

poetry

poetry add piexif

Installing piexif

Before you install

Low friction: pure Python wheel with no runtime dependencies. Dormant maintenance (last release 2019-07-01, last commit 2023-11-22) but marked Production/Stable and carries no known vulnerabilities.

License in practice

MIT license (permissive) — you can use, modify, and distribute piexif freely in commercial and private projects with minimal restriction.

Quickstart

pip install piexif

import piexif

exif_dict = piexif.load("photo.jpg")
for ifd in ("0th", "Exif", "GPS", "1st"):
    for tag in exif_dict[ifd]:
        print(piexif.TAGS[ifd][tag]["name"], exif_dict[ifd][tag])

Verify before relying

  • Whether the package's dormant status (no releases since 2019) affects real-world reliability with modern camera EXIF formats.
  • Performance characteristics when processing large batches of images or very large EXIF payloads.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance dormant — 2,601 days since the last release
Last repo commit
First released
Downloads 2,831,654/month — #2,874 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: piexif-1.1.3-py2.py3-none-any.whl

Keywords: exif, jpeg

Development Status :: 5 - Production/StableLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: IronPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: MultimediaTopic :: Printing

Tags

exif metadata reader writerjpeg exif manipulationread exif data pythonexif editor libraryimage metadata exifremove exif from photosexif transplant copy
exif-metadataimage-processingpure-python

More Multimedia packages