Get providers of technosphere flows

Technosphere flows are products or waste flows that can be linked in a product system model. For products, the providers are processes that produce this product as output. For waste flows, providers are waste treatment processes with an input of that waste flow. These provider and flow pairs can be linked to product inputs and waste outputs of other processes in a product system.

Rest APIGET /data/providers
JSON-RPCdata/get/providers
Python IPCClient.get_providers
Return type:List[TechFlow]

Examples

Python IPC

import olca_ipc as ipc

client = ipc.Client()
for p in client.get_providers()[:5]:
    print(p)
# TechFlow(
#   provider=Ref(id='71dab7ae-4d58-4f73-8449-5967c296bcde', ...
#   flow=Ref(id='7f6bb533-2d3c-43a6-ac60-6eef299d7c52', ...

JSON-RPC via Fetch API

The example below shows the usage of this method using the JSON-RPC protocol via the Fetch API which is available in modern web-browsers or platforms like Deno.

  let resp = await fetch("http://localhost:8080", {
    method: "POST",
    body: JSON.stringify({
      jsonrpc: "2.0",
      id: 1,
      method: "data/get/providers",
    })
  });
  let v = await resp.json();
  console.log(v);
  // {
  //   jsonrpc: "2.0",
  //   result: [
  //     {
  //       provider: {
  //         "@type": "Process",
  //         "@id": "ba98a130-d92c-4c40-8fe9-c8cab5b956ab",
  //         name: "electricity production, wind, 1-3MW turbine, onshore",
  //         processType: "LCI_RESULT",
  //         flowType: "PRODUCT_FLOW"
  //       },