HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
RhetTbull
osxphotos
Python2019–2026
RhetTbull / osxphotos

osxphotos

Python app to work with pictures and associated metadata from Apple Photos on macOS. Also includes a package to provide programmatic access to the Photos library, pictures, and metadata.

14Distinct people
21Mentions
0Explicit recommenders
4KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Python app to work with pictures and associated metadata from Apple Photos on macOS. Also includes a package to provide programmatic access to the Photos library, pictures, and metadata.

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year21 dated mentions

Observed mentions: 2019-12-23 04:34:01 UTC to 2026-01-26 13:48:57 UTC.

02462019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments20192020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments20222023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 7 mentions; 0 submissions, 7 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC110
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC110
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC000
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC211
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC707
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC303
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC303
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC404

What Hacker News says

21 sources
> As far as I know, this is the only tool that restores albums and correctly round-trips all Photos item types while preserving location data, creation dates, and modification dates when restoring back into Photos. My free open source tool osxphotos [1] does this. In addition to an "osxphotos export" command to create archival exports with all metadata, it also has an "osxphotos import" command that can restore all metadata including albums (with exception of named persons/face regions, though persons can be converted into keywords on import). It can also read XMP sidecar files to restore metadata from those. It's a CLI and definitely a power user tool. It also includes an "osxphotos sync" command that can sync metadata between two libraries. Some people use this to sync metadata like favorites from iPhone library to the Mac library. (can
Read the rest
't go the other way unfortunately) [1] https://github.com/RhetTbull/osxphotos
In iCloud Photos Downloader
It does. It uses PhotoKit to access photos, so it basically uses your Apple Photos app (iOS or Mac) to download the photos. The only scripted solution I can think of that works with ADP is osxphotos[^1], but that also uses PhotoKit, and requires the user to be signed in. Personally I use PhotoSync [^2] to backup our photos from phones to a NAS. It works reliably, and supports exporting unmodified originals as well as edited versions, and XMP/AAE metadata alongside it. ^1: https://github.com/RhetTbull/osxphotos ^2: https://www.photosync-app.com/home
In iCloud Photos Downloader
> Any method that I've found to clean them up (exporting the originals, deleting them from the library, and then re-importing the JPEGs only seems easiest) will lose all of the years of metadata that I've built up in the library. The open source tool osxphotos (https://github.com/RhetTbull/osxphotos) can help with this. You can export the JPEG images while preserving metadata using the thrid-party exiftool utility: `osxphotos export /path/to/export --has-raw --skip-raw --exiftool` This exports all images that have a raw pair but skips the raw component then uses exiftool (https://exiftool.org/) to write the metadata (keywords, etc.) to the exported JPEG files. You can then re-import these into photos either by dragging them or by running `osxphotos import /path/to/export/*` Both the export and import commands have many other options for
Read the rest
controlling export directory, etc. `osxphotos help export` or `osxphotos docs` to open docs in browser. (Disclaimer: I'm the author of osxphotos)
In Cleaning up my 200GB iCloud with some JavaScript
Nice to hear from someone else with a huge iCloud Photo Library--we've got about 1.2 TB! After a lot of experimentation with Google Photos, Synology's photo APP, etc. we finally settled on going all in on the Apple ecosystem (we're an all-Apple family). The game-changer for us was when Apple finally supported shared photo libraries between users. The ability to search the photo library has been steadily improving (in my experience, Google still has an edge over Apple in this area) and with the advent of new AI technology I only expect it to get better. Except for special occasions I don't even attempt to "organize" or "tag" my photos. It reminds me of how Google Search surpassed early 'library catalog' style indexes like Yahoo. The biggest downside of iCloud is the lack of an API to access the data programmatically for backups etc. I've e
Read the rest
xperimented with `icloudpd` and it worked OK, but I'm not sure about the long-term stability as it's basically just "screen scraping" iCloud.com to download the photos from the web which is not officially supported by Apple and is sensitive to any changes to the website as well as the (remote?) possibility of getting your account banned. The performance is also bad as it has to download all photos even the ones that are already stored locally. There’s also `osxphotos` (https://github.com/RhetTbull/osxphotos) which works by reverse engineering the undocumented sqlite database in the photos library that Apple uses for storing the photos metadata. This avoids the performance problems of accessing the library through iCloud.com like `icloudp` does and enables many more features like searching by faces, places, etc. and they have an export function with a ton of options to backup your library. Finally, I have a side-project working on a simple set-it-and-forget Mac app for backing up your entire photo library (including iCloud Photos) to a local disk, network share, NAS, etc. Unlike the above options, it uses the official Apple PhotoKit library to access the photos and doesn’t require setting up a Python environment, running command-line tools, etc. If you’re interested check it out here: https://www.ibeni.net
In Ask HN: How do you manage photos, philosophically?
> Guess what, all these have Objective-C bridges, usually multiple ones, because the combination of being just a thin shim on top of C as well as that thin shim being essentially a Smalltalk with full dynamic messaging and runtime introspection + intercession means interop is Objective-C's bread and butter. Exactly. In fact sometimes in lieu of shell scripts I write simple utility JavaScript files using Objective-C APIs and run them under osascript. For Python, the easiest way to copy a file while not using twice the disk space (using reflinks) is still using the Objective-C API: https://github.com/RhetTbull/osxphotos/blob/20ef78bbd45a6787...
In Develop with Cocoa for Apple devices without using Objective-C
I'm the author of the osxphotos[0] tool mentioned in the article. For photos in an Apple Photos library, osxphotos gives you access to a rich set of metadata beyond what's in the actual EXIF/IPTC/XMP of the image. Apple performs object classification and other AI techniques on your images but generally doesn't expose this to the user. For example, photos are categorized as to object in them (dog, cat, breed of dog, etc.), rich reverse geolocation info (neighborhood, landmarks, etc.) and an interesting set of scores such as "overall aesthetic", "pleasant camera tilt", "harmonious colors", etc. These can be queried using osxphotos, either from the command line, or in your own python code. (Ref API docs[1]) For example, to find your "best" photos based on overall aesthetic score and add them to the album "Best Photos" you could run: osxphoto
Read the rest
s query --query-eval "photo.score.overall > 0.8" --add-to-album "Best Photos" To find good photos with trees in them you could try something like: osxphotos query --query-eval "photo.score.overall > 0.5" --label Tree --add-to-album "Good Tree Photos" There's quite a bit of other interesting data in Photos that you can explore with osxphotos. Run `osxphotos inspect` and it will show you all the metadata for whichever photo is currently selected in the Photos app. [0] https://github.com/RhetTbull/osxphotos [1] https://rhettbull.github.io/osxphotos/
In Exploring EXIF

Showing the 15 most recent of 21 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.