CLI Tool & Python Library
3.5k 2026-05-12
RhetTbull/osxphotos
A Python application and library to programmatically interact with Apple Photos on macOS, enabling querying of metadata and flexible photo export.
Core Features
Query Apple Photos library for metadata (keywords, persons, albums, etc.)
Export original and edited photos from Photos library
Programmatic access to Photos library via Python API
Support for iPhoto libraries (limited)
Cross-platform functionality for export and query on macOS and Linux
Quick Start
uv tool install --python 3.13 osxphotosDetailed Introduction
OSXPhotos is a versatile Python-based tool designed to extend the capabilities of Apple Photos on macOS. It provides both a command-line interface and a programmatic API, allowing users to deeply query their Photos library for various metadata such as filenames, paths, keywords, persons, and albums. Beyond querying, it facilitates the easy export of both original and edited versions of photos. This project empowers users with greater control and automation over their photo collections, even offering limited support for iPhoto libraries and cross-platform querying/export on Linux.