# ocx_sdk

*module*

Python SDK for [OCX](https://github.com/ocx-sh/ocx).

`ocx-sdk` drives the ocx binary rather than reimplementing it: ocx owns
resolution, verification, and the identifier grammar, and this package gives
you typed, CWD-independent handles over the commands it exposes.

```python
from ocx_sdk import Ocx, bootstrap

ocx = Ocx(exe=bootstrap.ensure())
project = ocx.project("/srv/build")
project.pull()
project.exec(["task", "verify"])
```

**This module is the API.** Everything listed in `__all__` is the stable
surface; every other module is underscored and package-private, and the one
public submodule is `ocx_sdk.bootstrap`. Reaching into an underscored path
means the next release may move it without notice — pre-1.0, breaking
changes ship without shims.

Start at `Ocx` for the runtime API and `bootstrap.ensure` for provisioning.

[View source](https://github.com/ocx-sh/ocx-sdk-python/blob/main/src/ocx_sdk/__init__.py#L1-L1)

## ocx_sdk.RepairEntry

*class* · *dataclass*

```python
class RepairEntry
```

Re-exported from: `ocx_sdk._results`

One package's `cascade repair` run.

**Attributes**

- `report` (`CascadeReport`) — The audit the plan was computed from — the same shape `check` reports.
- `planned` (`tuple[Mapping[str, Any], ...]`) — The alias indexes the run would write (or wrote), each `{tag, index, observed_digest, referenced_digests, reasons}`, carried untyped: the `index` is a whole OCI image index.
- `outcomes` (`tuple[RepairOutcome, ...]`) — What happened per tag. Empty on a dry run.
- `announce_tags` (`tuple[str, ...]`) — The rolling tags this run moved or created — the lines `--announce-tags` writes, echoed for a JSON consumer.

[View source](https://github.com/ocx-sh/ocx-sdk-python/blob/main/src/ocx_sdk/_results.py#L2728-L2756)

### ocx_sdk.RepairEntry.announce_tags

*attribute* · *instance attribute*

```python
announce_tags: tuple[str, ...]
```

[View source](https://github.com/ocx-sh/ocx-sdk-python/blob/main/src/ocx_sdk/_results.py#L2746-L2746)

### ocx_sdk.RepairEntry.outcomes

*attribute* · *instance attribute*

```python
outcomes: tuple[RepairOutcome, ...]
```

[View source](https://github.com/ocx-sh/ocx-sdk-python/blob/main/src/ocx_sdk/_results.py#L2745-L2745)

### ocx_sdk.RepairEntry.planned

*attribute* · *instance attribute*

```python
planned: tuple[Mapping[str, Any], ...]
```

[View source](https://github.com/ocx-sh/ocx-sdk-python/blob/main/src/ocx_sdk/_results.py#L2744-L2744)

### ocx_sdk.RepairEntry.report

*attribute* · *instance attribute*

```python
report: CascadeReport
```

[View source](https://github.com/ocx-sh/ocx-sdk-python/blob/main/src/ocx_sdk/_results.py#L2743-L2743)

### ocx_sdk.RepairEntry.from_dict

*method* · *classmethod*

```python
def from_dict(data: Mapping[str, Any]) -> RepairEntry
```

Build from one decoded `entries` entry.

[View source](https://github.com/ocx-sh/ocx-sdk-python/blob/main/src/ocx_sdk/_results.py#L2748-L2756)
