Python wrapper around Apple Photos applescript interface
Project description
PhotoScript
What is PhotoScript
PhotoScript provides a python wrapper around Apple Photos applescript interface. With PhotoScript you can interact with Photos using python. Runs only on MacOS. Tested on MacOS Catalina.
PhotosScript is limited by Photos' very limited AppleScript dictionary.
Installation
PhotoScript uses setuptools, thus simply run:
python3 setup.py install
Or you can install via pip:
pip install photoscript
Example
""" Simple example showing use of photoscript """
import photoscript
photoslib = photoscript.PhotosLibrary()
photoslib.activate()
print(f"Running Photos version: {photoslib.version}")
album = photoslib.album("Album1")
photos = album.photos
for photo in photos:
print(f"{photo.title}, {photo.description}, {photo.keywords}")
new_album = photoslib.create_album("New Album")
photoslib.import_photos(["/Users/rhet/Downloads/test.jpeg"], album=new_album)
photoslib.quit()
See Also
- osxphotos: Python package that provides read-only access to the Photos library including all associated metadata.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
photoscript-0.0.3.tar.gz
(5.6 kB
view hashes)
Built Distribution
Close
Hashes for photoscript-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00124ad40b996d161df4ff747c07651b806df20b5f19698028517404bf9c666b |
|
MD5 | 7402f93888fb035881bf98573f9280dc |
|
BLAKE2b-256 | 94144676118150f0052417c71f1e10f1d278a9b3f85222370d16081da1c68897 |