OSXPhotos is a Python application and library that provides programmatic and command-line access to Apple Photos libraries on macOS and Linux.
The tool solves the problem of extracting data and images from Apple's Photos.app by directly querying the Photos library database. It allows users to retrieve metadata including keywords, tags, face recognition data, albums, file names, and paths, and to export both original and edited photos. The approach works by reading the Photos database directly, enabling access across different macOS versions and even allowing a database created on one version to be read on another.
OSXPhotos suits developers and users who need to automate photo exports, build tools around their Photos library, or integrate Photos data into other workflows. The command-line interface handles export operations and database queries, while the Python API enables programmatic access for custom applications. The tool works on both macOS and Linux, though many features are macOS-specific; on Linux, export and query functionality remain available, making it useful for exporting photos from a Photos library on a non-Apple machine. The project also provides limited support for iPhoto libraries, though with fewer features than for Photos.
Development activity shows consistent maintenance with regular updates addressing new macOS versions. The project actively tracks compatibility across macOS releases from Sierra through Sequoia and maintains support for multiple Python versions. Recent work has focused on adapting to changes in newer macOS versions, including limited support for macOS Tahoe with acknowledgment of incomplete feature coverage.