> For the complete documentation index, see [llms.txt](https://docs.desci.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.desci.com/create-and-publish/interact-and-reuse/compute/tbd-data-to-compute.md).

# \[TBD] Data to compute

{% hint style="warning" %}
**Data to Compute is currently disabled.**&#x20;

Compute is in testing phase with trusted users.&#x20;
{% endhint %}

## Basic dPid Fetch usage (WIP)

You can find the dPid Fetch repository here <https://github.com/desci-labs/desci-fetch>

**Quick start guide**

1. Clone the dpid fetch repository <https://github.com/desci-labs/desci-fetch>
2. Open up the file 'example-run.py', take note of the dpid being passed in, and the mapping of files to variables (WIP - EXAMPLE BEING UPDATED FOR LATEST RESOLVER).
3. Run the example in your IDE using `'python3 example-run.py'`

**Syntax Guide**

`import desci.fetch as dpid`

`with dpid.fetch([('hello.py', 'imported')], dpid="3/v1/1"):`&#x20;

`import imported`

`print(str.upper(imported.hello()) + " world!")`

Given the above example, the parameters passed in are as such;

`dpid.fetch(`<mark style="color:blue;">`[`</mark><mark style="color:purple;">`(`</mark><mark style="color:orange;">`'hello.py'`</mark>`,`` `<mark style="color:yellow;">`'imported'`</mark><mark style="color:purple;">`)`</mark><mark style="color:blue;">`]`</mark>`, dpid="3/v1/1")`

The first parameter is an <mark style="color:blue;">array</mark> of <mark style="color:purple;">tuples</mark> that accepts a <mark style="color:orange;">valid string path to a python file</mark> within the imported code repository, and a <mark style="color:yellow;">variable name</mark> that the imported code should be assigned to, e.g. in this instance, <mark style="color:orange;">'hello.py'</mark> will be assigned to variable <mark style="color:yellow;">'imported'</mark>.

`dpid.fetch([('hello.py', 'imported')], dpid="`<mark style="color:purple;">`3`</mark>`/`<mark style="color:orange;">`v1`</mark>`/`<mark style="color:yellow;">`1`</mark>`")`

The second parameter is a string that accepts a dpid query that points to a code file, as a reminder the syntax for dPIDs is as follows; <mark style="color:purple;">{dpid}</mark>/<mark style="color:orange;">{version}</mark>/<mark style="color:yellow;">{component Index}</mark>

<mark style="color:purple;">dpid</mark>: The identifier assigned for a published node.

<mark style="color:orange;">version</mark>: A number that's zero indexed, or a version with a 'v' prefix. e.g. for the first version specify "0" or "v1", for the second version specify "1" or "v2"

<mark style="color:yellow;">component index</mark>: The index number of the component as specified in the manifest file, which you could access by appending ?raw to the dpid link as such: "<https://beta.dpid.org/2/v1?raw>"
