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

*attribute*

```python
LogLevel
```

Re-exported from: `ocx_sdk._types`

ocx `--log-level` values. A `Literal` because nothing but argv consumes it.

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

## ocx_sdk.MANAGED_CONFIG_DISABLED

*attribute* · *module attribute*

```python
MANAGED_CONFIG_DISABLED: Final = ''
```

Re-exported from: `ocx_sdk._types`

Wire sentinel that force-disables the managed config tier for a spawn.

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

## ocx_sdk.MIN_SUPPORTED

*attribute* · *module attribute*

```python
MIN_SUPPORTED: Final = '0.6.2'
```

Re-exported from: `ocx_sdk._types`

Oldest ocx the SDK accepts; below it the compat gate raises `VersionCompatError`.

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

## ocx_sdk.MaybeRetry

*attribute*

```python
MaybeRetry
```

Re-exported from: `ocx_sdk._client`

A per-call retry override: a policy, `None` to opt out, or `UNSET` to take the config's.

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

## ocx_sdk.MaybeTimeout

*attribute*

```python
MaybeTimeout
```

Re-exported from: `ocx_sdk._client`

A per-call timeout override: seconds, `None` to wait forever, or `UNSET` to take the config's.

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

## ocx_sdk.ListVar

*class* · *dataclass*

```python
class ListVar
```

Re-exported from: `ocx_sdk._types`

An `[env]` value appended to a separated list.

**Attributes**

- `value` (`str`) — The entry to append.
- `separator` (`str | None`) — The list separator. `None` means the entry agrees with whatever separator the variable already uses; a conflict is an error at merge time, not a silent re-split.

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

### ocx_sdk.ListVar.separator

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

```python
separator: str | None = field(default=None, kw_only=True)
```

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

### ocx_sdk.ListVar.value

*attribute* · *instance attribute*

```python
value: str
```

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