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

*class* · *dataclass*

```python
class GroupStatus
```

Re-exported from: `ocx_sdk._results`

One group of `ocx status`.

**Attributes**

- `tools` (`Mapping[str, ToolBinding]`) — Binding name to its binding state.
- `env` (`Mapping[str, Mapping[str, Any]]`) — The group's `[env]` table, keyed by variable name, carried through untyped. It is keyed here (`{KEY: {type, value}}`) rather than the array form `ocx env` emits, and no probe has yet seen it populated — so it stays a pass-through instead of a struct built on an unobserved shape.

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

### ocx_sdk.GroupStatus.env

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

```python
env: Mapping[str, Mapping[str, Any]] = _EMPTY
```

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

### ocx_sdk.GroupStatus.tools

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

```python
tools: Mapping[str, ToolBinding] = _EMPTY
```

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

### ocx_sdk.GroupStatus.from_dict

*method* · *classmethod*

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

Build from one decoded entry of the `groups` object.

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