AWS Thinkbox Discussion Forums

accessing the Deadline scripting API from outside the repository

When writing Python programs inside of the repository, calling the Python API is pretty straight forward.

from Deadline.Events import * from Deadline.Jobs import * from Deadline.Reports import * from Deadline.Scripting import *

Is it possible to access the API outside of the repo? Normally if I want to do something like that, I just write something like this:

sys.path.insert(1, r"path to MyLibrary") import MyLibrary

I was looking for the Deadline API in our repo, but I could not find it.

The issue is not so much about pathing as about which Python is executing the scripts. Deadline has its own special python that gives it access to .NET, cPython, and the Deadline API. If scripts are run via the Python within the Deadline Client installation (dpython in the bin folder), it shouldn’t matter where the scripts are located. The preferred way is to use something like:

deadlinecommand ExecuteScript yourscriptname.py

For accessing the Deadline API from a standard Python, you could use the Python Standalone API in conjunction with the Deadline Web Service.

Check out this Feature Blog post for more info: Your Code Here: A Brief Outline of Deadline Entry Points

Privacy | Site terms | Cookie preferences