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

*class* · *dataclass*

```python
class SignedPlatformReport
```

Re-exported from: `ocx_sdk._results`

One platform's signing outcome, nested in `PushResult.signatures` (C-018).

`push.rs:115`. The three optionals are absent-when-none (D7): a
platform whose signing needed no more than the default leg carries
`report` alone, and `kind`/`message` populate only when that platform's
signing failed.

**Attributes**

- `platform` (`str`) — The platform this row describes.
- `status` (`str`) — A `SweptStatus` value (`completed`/`skipped`/`failed`), carried as raw `str` (D8).
- `report` (`SignatureReport | None`) — The platform's own `SignatureReport`, when produced.
- `kind` (`str | None`) — The machine-branchable failure slug, when this platform failed.
- `message` (`str | None`) — Sanitized prose describing the failure, free to be reworded.

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

### ocx_sdk.SignedPlatformReport.kind

*attribute* · *class attribute* · *instance attribute*

```python
kind: str | None = None
```

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

### ocx_sdk.SignedPlatformReport.message

*attribute* · *class attribute* · *instance attribute*

```python
message: str | None = None
```

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

### ocx_sdk.SignedPlatformReport.platform

*attribute* · *instance attribute*

```python
platform: str
```

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

### ocx_sdk.SignedPlatformReport.report

*attribute* · *class attribute* · *instance attribute*

```python
report: SignatureReport | None = None
```

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

### ocx_sdk.SignedPlatformReport.status

*attribute* · *instance attribute*

```python
status: str
```

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

### ocx_sdk.SignedPlatformReport.from_dict

*method* · *classmethod*

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

Build from one decoded entry of `PushResult.signatures`.

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