> ## Documentation Index
> Fetch the complete documentation index at: https://docs.coreweave.com/llms.txt
> Use this file to discover all available pages before exploring further.

# results

> Block for one or more OperationRefs and return results.

Source: [src/cwsandbox/**init**.py:89](https://github.com/coreweave/cwsandbox-client/blob/v0.22.0/src/cwsandbox/__init__.py#L89)

```python theme={"system"}
results(ref: OperationRef[T], /) -> T
```

```python theme={"system"}
results(refs: Sequence[OperationRef[T]], /) -> list[T]
```

Block for one or more OperationRefs and return results.

This is a convenience function for retrieving results from OperationRefs.
For a single ref, returns the result directly. For a sequence of refs,
returns a list of results in the same order.
**Parameters**

* `refs` (`OperationRef[T] | Sequence[OperationRef[T]]`): A single OperationRef or a sequence of OperationRefs.

**Returns**

* `T | list[T]`: The result(s) from the operation(s).

**Raises**

* `Exception`: Any exception raised by the underlying operation(s).

**Examples**

Single ref:

```python theme={"system"}
data = cwsandbox.results(sandbox.read_file("/path"))
```

Multiple refs:

```python theme={"system"}
all_results = cwsandbox.results([sb.read_file(f) for f in files])
```
