Package schrodinger :: Package job :: Module jobapi
[hide private]
[frames] | no frames]

Module jobapi

Classes [hide private]
  JobAPI
Provide access to the Schrodinger Job API.
Functions [hide private]
 
_get(url, **kwargs)
 
_delete(url, **kwargs)
 
_post(url, body=None, **kwargs)
 
_put(url, body=None, **kwargs)
 
_head(url, **kwargs)
 
_response_body(resp, format)
 
_raise_for_status(resp)
Raise an HTTPError if the response failed with a status code >= 400 and < 600.
int
get_local_jserver_port()
Get the port of jserver listening on our own host
int
get_jobserver_port(host, schrod, user='buildbot')
Get the port of the job server with given parameters.
Variables [hide private]
  logger = log.getLogger('jobapi')
  JSON_FORMAT = 'application/json'
  PLAIN_FORMAT = 'text/plain'
  FULL_VIEW = 'full'
  INDEX_VIEW = 'index'
  JOBID_VIEW = 'jobid'
  FTYPE_INPUT = 'input'
  FTYPE_OUTPUT = 'output'
  FTYPE_OTHER = 'other'
  OPTION_TRUE = 'true'
  OPTION_FALSE = 'false'
  REQUEST_TIMEOUT = 120
  __package__ = 'schrodinger.job'
Function Details [hide private]

_raise_for_status(resp)

 

Raise an HTTPError if the response failed with a status code >= 400 and < 600. The body of the response is assumed to include more information about the error.

This re-implements the raise_for_status() method from the requests module, but includes the URL and response body in the raised exception.

get_local_jserver_port()

 

Get the port of jserver listening on our own host

Returns: int
jserver port number (0 if none)

get_jobserver_port(host, schrod, user='buildbot')

 

Get the port of the job server with given parameters.

Parameters:
  • host (string) - hostname (short or FQDN) by which we can contact the job server host
  • user (string) - remote username corresponding to the user that the job server is running under
  • schrod (string) - full path to remote schrodinger installation on host
Returns: int
job server port (0 if none)