Skip to content

Python programmatic interface

Jorge edited this page Jan 12, 2021 · 13 revisions

pfconclient Python3 programmatic interface

The pfconclient package provides a client module with seven main methods among others:

  1. run_job: Run plugin until finished and get the resulting files in a local directory
  2. submit_job: Submit plugin for execution and return
  3. poll_job_status: Keep polling for the execution status of a previously submitted plugin until it finishes
  4. get_job_status: Perform a single check of the execution status of a previously submitted plugin
  5. get_job_zip_data: Download the output files of a previously submitted plugin that has already finished as a single zip file and return the content of the zip file
  6. get_job_zip_file: Download the output files of a previously submitted plugin that has already finished as a single zip file and save the file into a local directory
  7. get_job_files: Download the output files of a previously submitted plugin that has already finished as a single zip file and unpack the zip file's content files within a local directory

Instantiate the client:

    from pfconclient import client

    cl = client.Client('http://localhost:5006/api/v1/')
Clone this wiki locally