Deadline Standalone Python Reference


This is the documentation for the Deadline Standalone Python API. The Standalone Python API can be used in Python for communicating with the HTTP API. In order to use the HTTP API you must have the Web Service running on a machine whose address and port number you know.


In order to use the Standalone Python API you must have Python 2.7 or later installed. Copy the "Deadline" folder containing the Standalone Python API from //your/repository/api/python to the "site-packages" folder of your Python installation and the API is ready to use.

Using the API

First, a DeadlineCon object must be created, which is used to communicate with the Web Service to send and receive requests. First "import Deadline.DeadlineConnect as Connect", then create your connection object "connectionObject = Deadline.DeadlineConnect.DeadlineCon('WebServiceName', WebServicePortNumber)", where 'WebServiceName' is the DNS name or IP address of the machine currently running the Web Service and 'WebServicePortNumber' is the Web Service Port Number as configured in the [Repository Options] - [Web Service and Proxy Server] settings. By default it is: 8082. The "connectionObject" variable can now be used to communicate requests to the Web Service.

Example: Getting group names and suspending a job

import Deadline.DeadlineConnect as Connect
connectionObject = Connect.DeadlineCon('WebServiceName', 8082)
print connectionObject.Groups.GetGroupNames()
jobId = ...(valid job ID)
print connectionObject.Jobs.SuspendJob(jobId)

All of the Standalone Python API functions return a Python dictionary, a Python list, or a Python string. Lists often contain dictionaries.

Example: Getting a list, a list containing dictionaries, a dictionary, and a string back.

import Deadline.DeadlineConnect as Connect
groupNames = connectionObject.Groups.GetGroupNames()
print groupNames[0]
jobs = connectionObject.Jobs.GetJobs()
print jobs[0]['FailedChunks']
task = connectionObject.Tasks.GetJobTask(jobId, 0)
print task["Errs"]
root = connectionObject.Repository.GetRootDirectory()

Example: Getting a job, changing the pool and priority then saving it

import Deadline.DeadlineConnect as Connect
job = connectionObject.Jobs.GetJob(jobId)
print str(job['Props']['Pool'])
job['Props']['Pool'] = unicode('jobPool')
print str(job['Props']['Pool'])
print str(job['Props']['Pri'])
job['Props']['Pri'] = 75
print str(job['Props']['Pri'])
job = connectionObject.Jobs.GetJob(jobId)
print str(job['Props']['Pool']) + ' ' +str(job['Props']['Pri'])

Example: Submitting a job using Python dictionaries

import Deadline.DeadlineConnect as Connect

if __name__ == '__main__':

    Deadline = Connect.DeadlineCon('WebServiceName', 8082)

    JobInfo = {
        "Name": "Submitted via Python",
        "UserName": "UserName",
        "Frames": "0-1",
        "Plugin": "VraySpawner"

    PluginInfo = {
        "Version": "Max2014"

        newJob = Deadline.Jobs.SubmitJob(JobInfo, PluginInfo)
        print newJob
        print "Sorry, Web Service is currently down!"