BackburnerPy¶
BackburnerPy is an unofficial Python API for Autodesk Backburner
BackburnerPy.Monitor¶
-
class
Monitor.
Monitor
(_manager_ip, _manager_port, _debug=20)¶ API class that emulates Backburner Monitor behaviour
This class contains the API to interact with Backburner Manager instances by establishing a connection and sending requests via TCP.
-
MANAGER_IP
¶ Manager IP address
- Type
str
-
MANAGER_PORT
¶ Manager TCP port
- Type
int
-
logging_level
¶ Verbosity log level. Defaults to logging.INFO. Other options include logging.DEBUG. See documentation of Python module logging for more information.
- Type
int
-
open_connection
()¶ Open a connection with the Backburner Manager
- When opening a successful connection with Manager, it will send two packets:
“250 backburner 1.0 Ready.”
“backburner>” or ‘backburner(Controller)>’
-
close_connection
()¶ Close connection with the Backburner Manager
-
get_manager_info
()¶ Retrieve information on the Backburner Manager
- Returns
A
BackburnerManagerInfo
data class object containing the Backburner Manager information
-
get_client_list
()¶ Retrieve the client list
- Returns
A
list
ofClient
data class objects for each client
-
get_plugin_list
()¶ Retrieve the plug-in list
- Returns
A
list
ofPlugin
data class objects for each client
-
get_server_list
()¶ Retrieve the server list
- Returns
A
list
ofServerListItem
data class objects for each client
-
get_server
(server_handle)¶ Retrieve information on a particular server
- Parameters
server_handle (str) – The handle of the server.
- Returns
A
Server
data class object containing information on the requested server
-
get_job_handle_list
()¶ Retrieve the job handle list
- Returns
A
list
ofJobHandleListItem
data class objects for each job
-
get_job_list
()¶ Retrieve the job list
- Returns
A
list
ofJobListItem
data class objects for each job
-
get_job
(job_handle)¶ Retrieve information on a particular job
- Parameters
job_handle (str) – The handle of the server. You might find a hex value for this, convert this first to decimal value!
- Returns
A
Job
data class object containing information on the requested server
-
get_jobstate
(job_handle)¶ Gets the state of specified job
- Jobstates:
0 Completed 1 Not started 2 Active 3 Suspended (presumably)
- Parameters
job_handle (str) – The handle of the server. You might find a hex value for this, convert this first to decimal value!
jobstate (int) – Jobstate as int. TODO: Find out values of jobstates
- Returns
Returns a three element tuple containing the response code (int), job state as int (str) and empty requested data (bytes).
-
set_jobstate
(job_handle, jobstate)¶ Sets the state of specified job
- Jobstates:
0 Completed 1 Not started 2 Active 3 Suspended (presumably)
- Parameters
job_handle (str) – The handle of the server. You might find a hex value for this, convert this first to decimal value!
jobstate (int) – Jobstate as int. TODO: Find out values of jobstates
- Returns
Returns a three element tuple containing the response code (int), response message (str) and empty requested data (bytes). If succesful, the response will be ‘200 OK’
-
get_taskname
(job_handle)¶ TODO: Research and implement this function
-
get_jobarchive
()¶ Retrieve the job archive list
- Returns
A
list
ofJobArchiveListItem
data class objects for each job
-
set_jobarchive
(job_handle)¶ Send or retrieve specified job to or from job archive
TODO: Implement this function
-
del_controller
(state)¶ TODO: Research and implement this function
This command has been observed to happen in conjuction with adjusting the state of a job, e.g:
>del controller Yes >set jobstate 1256275308 1 >del controller No
What del exactly means or what it does is slightly unclear
-
Backburner.BackburnerDataClasses¶
-
class
BackburnerDataClasses.
NetworkStatus
(dropped_packets: int, bad_packets: int, tcp_requests: int, udp_requests: int, boot_time: str)¶ Backburner Manager network status
-
dropped_packets
¶ - Type
int
-
bad_packets
¶ - Type
int
-
tcp_requests
¶ - Type
int
-
udp_requests
¶ - Type
int
-
boot_time
¶ - Type
str
-
-
class
BackburnerDataClasses.
SystemInfo
(total_memory: int, total_memory_f: float, num_cpus: int, platform: str, user: str, computer_name: str, mac: str, workdisk_space: int, ip_address: str)¶ Backburner Manager system information
-
total_memory
¶ - Type
int
-
total_memory_f
¶ - Type
float
-
num_cpus
¶ - Type
int
-
platform
¶ - Type
str
-
user
¶ - Type
str
-
computer_name
¶ - Type
str
-
mac
¶ - Type
str
-
workdisk_space
¶ - Type
int
-
ip_address
¶ - Type
str
-
-
class
BackburnerDataClasses.
HardwareInfo
(total_memory: int, total_memory_f: float, num_cpus: int, platform: str, workdisk_space: int, mac: str)¶ Backburner Manager hardware information
-
total_memory
¶ - Type
int
-
total_memory_f
¶ - Type
float
-
num_cpus
¶ - Type
int
-
platform
¶ - Type
str
-
workdisk_space
¶ - Type
int
-
mac
¶ - Type
str
-
-
class
BackburnerDataClasses.
BackburnerManagerInfo
(version: int, servers: int, jobs: int, system_info: BackburnerDataClasses.SystemInfo, network_status: BackburnerDataClasses.NetworkStatus)¶ Backburner Manager information
-
version
¶ - Type
int
-
servers
¶ - Type
int
-
jobs
¶ - Type
int
-
system_info
¶ - Type
-
network_status
¶ - Type
-
-
class
BackburnerDataClasses.
Client
(version: int, udp_port: int, controller: bool, system_info: BackburnerDataClasses.SystemInfo)¶ Client information
-
version
¶ - Type
int
-
udp_port
¶ - Type
int
-
controller
¶ - Type
bool
-
system_info
¶ - Type
-
-
class
BackburnerDataClasses.
Plugin
(version: int, name: str, description: str)¶ Plugin information
-
version
¶ - Type
int
-
name
¶ - Type
str
-
description
¶ - Type
str
-
-
class
BackburnerDataClasses.
JobArchiveListItem
(handle: int, name: str, user: str, description: str, submission_date: str, end_job_date: str, plugin_name: str, plugin_version: int)¶ -
handle
¶ - Type
int
-
name
¶ - Type
str
-
user
¶ - Type
str
-
description
¶ - Type
str
-
submission_date
¶ - Type
str
-
end_job_date
¶ - Type
str
-
plugin_name
¶ - Type
str
-
plugin_version
¶ - Type
int
-
-
class
BackburnerDataClasses.
JobHandleListItem
(handle: int, state: int)¶ Item in Job Handle List
-
handle
¶ - Type
int
-
state
¶ - Type
int
-
-
class
BackburnerDataClasses.
JobListItem
(handle: int, state: int, name: str, plugin_name: str, plugin_version: int)¶ Item in Job List
-
handle
¶ - Type
int
-
state
¶ - Type
int
-
name
¶ - Type
str
-
plugin_name
¶ - Type
str
-
plugin_version
¶ - Type
int
-
-
class
BackburnerDataClasses.
JobInfo
(version: int, handle: int, name: str, description: str, priority: int, user: str, computer: str, last_updated: str, submitted: str, started: str, ended: str, number_tasks: int, tasks_completed: int, encoding: str)¶ Job information
-
version
¶ - Type
int
-
handle
¶ - Type
int
-
name
¶ - Type
str
-
description
¶ - Type
str
-
priority
¶ - Type
int
-
user
¶ - Type
str
-
computer
¶ - Type
str
-
last_updated
¶ - Type
str
-
submitted
¶ - Type
str
-
started
¶ - Type
str
-
ended
¶ - Type
str
-
number_tasks
¶ - Type
int
-
tasks_completed
¶ - Type
int
-
encoding
¶ - Type
str
-
-
class
BackburnerDataClasses.
JobFlags
(active: bool, complete: bool, nonconcurrent: bool, nonstoppable: bool, ignore_job_share: bool, has_dependencies: bool, zip_archive: bool, leave_in_queue: bool, archive_when_done: bool, delete_when_done: bool, override_blocking_tasks: bool, enable_blocking_tasks: bool)¶ Job flags
-
active
¶ - Type
bool
-
complete
¶ - Type
bool
-
nonconcurrent
¶ - Type
bool
-
nonstoppable
¶ - Type
bool
- Type
bool
-
has_dependencies
¶ - Type
bool
-
zip_archive
¶ - Type
bool
-
leave_in_queue
¶ - Type
bool
-
archive_when_done
¶ - Type
bool
-
delete_when_done
¶ - Type
bool
-
override_blocking_tasks
¶ - Type
bool
-
enable_blocking_tasks
¶ - Type
bool
-
-
class
BackburnerDataClasses.
JobPlugin
(plugin_name: str, plugin_version: int)¶ Job plugin information
-
plugin_name
¶ - Type
str
-
plugin_version
¶ - Type
int
-
-
class
BackburnerDataClasses.
JobAlerts
(enabled: bool, failure: bool, progress: bool, completion: bool, nth_task: int, send_email: bool, include_summary: bool, email_from: str, email_to: str, email_server: str)¶ Job alert settings
-
enabled
¶ - Type
bool
-
failure
¶ - Type
bool
-
progress
¶ - Type
bool
-
completion
¶ - Type
bool
-
nth_task
¶ - Type
int
-
send_email
¶ - Type
bool
-
include_summary
¶ - Type
bool
-
email_from
¶ - Type
str
-
email_to
¶ - Type
str
-
email_server
¶ - Type
str
-
-
class
BackburnerDataClasses.
JobServer
(handle: str, active: bool, task_time: float, task_total: int, context_switch: int, rt_failed: bool)¶ Job server information
-
handle
¶ - Type
str
-
active
¶ - Type
bool
-
task_time
¶ - Type
float
-
task_total
¶ - Type
int
-
context_switch
¶ - Type
int
-
rt_failed
¶ - Type
bool
-
-
class
BackburnerDataClasses.
Job
(info: BackburnerDataClasses.JobInfo, flags: BackburnerDataClasses.JobFlags, plugin: BackburnerDataClasses.JobPlugin, alerts: BackburnerDataClasses.JobAlerts, servers: list)¶ Job information
-
class
BackburnerDataClasses.
ServerSchedule
(sunday: int, monday: int, tuesday: int, wednesday: int, thursday: int, friday: int, saturday: int)¶ Server schedule
Each day is assigned a 24 bit bytearray that is represented by an integer. Each bit in the array represents an hour in the day, starting from 00:00 till 23:00.
To design a schedule, simply create a 24 bit bytearray, with 1s where the server is allowed to be active, and 0s when the server has to be inactive. The following example is the server’s setting for a day where the computer is inactive during office hours, i.e. from 07:00 till 18:00:
Binary: 111111100000000000111111
Decimal: 16646207
-
sunday
¶ - Type
int
-
monday
¶ - Type
int
-
tuesday
¶ - Type
int
-
wednesday
¶ - Type
int
-
thursday
¶ - Type
int
-
friday
¶ - Type
int
-
saturday
¶ - Type
int
-
class
BackburnerDataClasses.
ServerListItem
(handle: str, state: int, name: str)¶ Server item in list
-
handle
¶ - Type
str
-
state
¶ - Type
int
-
name
¶ - Type
str
-
-
class
BackburnerDataClasses.
Server
(version: int, name: str, user_name: str, total_task: int, total_time: float, perf_index: float, ip_address: str, current_status: int, hw_info: BackburnerDataClasses.HardwareInfo, network_status: BackburnerDataClasses.NetworkStatus, server_schedule: BackburnerDataClasses.ServerSchedule, att_priority: bool, una_priority: bool, current_job: int, current_task: int, task_started: str, plugins: list)¶ Server information
-
version
¶ - Type
int
-
name
¶ - Type
str
-
user_name
¶ - Type
str
-
total_task
¶ - Type
int
-
total_time
¶ - Type
float
-
perf_index
¶ - Type
float
-
ip_address
¶ - Type
str
-
current_status
¶ - Type
int
-
hw_info
¶ - Type
-
network_status
¶ - Type
-
server_schedule
¶ - Type
-
att_priority
¶ - Type
bool
-
una_priority
¶ - Type
bool
-
current_job
¶ - Type
int
-
current_task
¶ - Type
int
-
task_started
¶ - Type
str
-