A Python implementation of Adobe's Creative Cloud Lightroom API.
This project is new and needs a lot of work. Use with caution.. See the issues page for some low hanging fruit if you have time to contribute :D.
You'll need two things:
- A lightroom integration api key
- A token for your user.
See the Lightroom's getting started walks you through this, but it's not very inutitive.. issue #2 should add more documentation here.
The python package can be installed via pip/git:
pip install git+https://github.com/lou-k/lightroom-cc-api.git@VERSION
where VERSION
is a relase tag.
In addition, you'll need libmagic. Install via:
- OSX:
brew install libmagic
- Ubuntu:
sudo apt-get install libmagic
The Lightroom
api object has the health
, account
, and catalog
endpoints.
It also provides catalog api:
from lightroom import Lightroom
lr_api = Lightroom(api_key, token)
catalog = lr_api.catalog_api()
The catalog api contains all of of the assets
and albums
calls.
# get the assets in the catalog
catalog.assets()
...
The catalog api also has two higher-level functions to help you add media to your Lightroom account:
# Uploads an image to lightroom
catalog.upload_image_file(path_to_image)
# Uploads an image to lightroom if it's not already in there.
catalog.upload_image_file_if_not_exists(path_to_image)