Remote storage hook scripts and library dependencies

Hi, I am new to Shotgun. Was asked to write some remote storage integrations. I checked out this example:

Let’s say I want to write an integration with Dropbox. Can I use third party modules in my Python script like the Python dropbox sdk? Where do you usually keep your third party libraries in your configuration setup? Maybe there is a good documentation about this? Thanks in advance, Reik


Hi and welcome to the forums, and great question!!

So we don’t really have documentation on this, as the config is not designed to be a vehicle to deploy tools other than Toolkit apps, however, you could copy the dropbox sdk into the config.

Using the approach mentioned in this post to get the config path, you could get the config folder path, add the relative path to your 3rd party modules, then sys.path.append(drop_box_path), and then hopefully import it.

I don’t know how big the drop box sdk is, but I would say be careful about adding large components into a distributed config, as the user will have to download it again everytime you update the config. Another approach would be to fork the framework, and add the sdk to there, so that it would only get downloaded when you update the framework.

1 Like