compiler.controllers module

Request controllers.

compiler.controllers.compile(request_data, token, session, is_authorized=<function <lambda>>)[source]

Start compilation of an upload workspace.

Parameters
  • request_data (MultiDict) – Data payload from the request.

  • token (str) – Auth token to be used for subrequests (e.g. to file management service).

Returns

  • dict – Response data.

  • int – HTTP status code.

  • dict – Headers to add to response.

Return type

Tuple[dict, int, dict]

compiler.controllers.get_log(source_id, checksum, output_format, is_authorized=<function <lambda>>)[source]

Get a compilation log.

Parameters
  • source_id (int) – Identifier for the source package.

  • checksum (str) – Checksum of the source package to compile.

  • output_format (str) – Desired output format. Only pdf is currently supported.

Returns

  • dict – Response data.

  • int – HTTP status code.

  • dict – Headers to add to response.

Return type

Tuple[dict, int, dict]

compiler.controllers.get_product(source_id, checksum, output_format, is_authorized=<function <lambda>>)[source]

Get the product of a compilation.

Parameters
  • source_id (int) – Identifier for the source package.

  • checksum (str) – Checksum of the source package to compile.

  • output_format (str) – Desired output format. Only pdf is currently supported.

Returns

  • dict – Response data.

  • int – HTTP status code.

  • dict – Headers to add to response.

Return type

Tuple[dict, int, dict]

compiler.controllers.get_status(source_id, checksum, output_format, is_authorized=<function <lambda>>)[source]

Get the status of a compilation.

See schema/resources/compilationStatus.json.

Parameters
  • source_id (int) – Identifier for the source package.

  • checksum (str) – Checksum of the source package to compile.

  • output_format (str) – Desired output format. Only pdf is currently supported.

Returns

  • dict – Response data.

  • int – HTTP status code.

  • dict – Headers to add to response.

Return type

Tuple[dict, int, dict]

compiler.controllers.service_status(*args, **kwargs)[source]

Exercise dependencies and verify operational status.

Return type

Tuple[dict, int, dict]