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

> 1つ以上の OperationRef の完了を待機し、結果を返します。

ソース: [src/cwsandbox/**init**.py:144](https://github.com/coreweave/cwsandbox-client/blob/v1.14.2/src/cwsandbox/__init__.py#L144)

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

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

1つ以上の OperationRef が完了するまでブロックし、結果を返します。

これは OperationRef から結果を取得するための便利な関数です。
単一の ref の場合は結果をそのまま返します。ref のシーケンスの場合は、
同じ順序で結果のリストを返します。
**パラメーター**

* `refs` (`OperationRef[T] | Sequence[OperationRef[T]]`): 単一の OperationRef、または OperationRef のシーケンス。

**戻り値**

* `T | list[T]`: 操作の結果。

**例外**

* `Exception`: 基盤となる操作が送出した例外。

**例**

単一の ref:

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

複数の ref:

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