Manipulate Finder .DS_Store files from Python
Actively maintained. Last release 2 weeks ago, commits in 10 of the last 26 weeks. A safe choice.
pip install ds-storeds_store
ds_store lets you examine and modify .DS_Store files from Python code; since it is written in pure Python, it is portable and will run on any platform, not just macOS.
Credit is due to Wim Lewis, Mark Mentovai and Yvan Barthélemy for reverse-engineering the .DS_Store file format. See Wim Lewis’ excellent documentation on CPAN for more information.