Generate/parse macOS Alias records from Python
Actively maintained. Last release 2 weeks ago, commits in 10 of the last 26 weeks. A safe choice.
pip install mac-aliasmac_alias
mac_alias lets you generate or read binary Alias and Bookmark records from Python code.
While it is written in pure Python, some macOS specific code is required to generate a proper Alias or Bookmark record for a given file, so this module currently is not portable to other platforms.
Credit is due to Wim Lewis wiml@hhhh.org, whose work on reverse engineering the alias format was extremely useful in writing this code. Alastair Houghton alastair@alastairs-place.net was responsible for reverse engineering the bookmark format.
See the documentation for more information.