actinia-org / actinia-jupyter

Jupyter notebooks for the actinia tutorial
GNU General Public License v3.0
5 stars 2 forks source link

add helper fn to create process chains #4

Closed metzm closed 2 years ago

metzm commented 2 years ago

Maybe this new helper function is of wider interest, e.g. for the actinia-python-client.

How to use:

  1. initialize a process chain
    process_chain = {"version": 1, "list": []}
    1. create a new item for the list
      pc_item = create_actinia_pc_item(...)
  2. add the new item to the list
    process_chain["list"].append(pc_item)
  3. Repeat 2. and 3. until the list is complete, then send the process chain to actinia
    request = requests.post(url=request_url, auth=actinia_auth, json=process_chain)