> 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>"


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.desci.com/create-and-publish/interact-and-reuse/compute/tbd-data-to-compute.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
