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

*attribute*

```python
LazyMode
```

Re-exported from: `ocx_sdk._client`

When a tool's content downloads: eagerly, or on first use.

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

## ocx_sdk.InstallEnv

*class*

```python
class InstallEnv(StrEnum)
```

Bases: `StrEnum`

Re-exported from: `ocx_sdk._types`

The `OCX_INSTALL_*` grammar the setup script defines.

`bootstrap.ensure()` honors these verbatim, one rung below its explicit
keyword arguments and one above its own defaults.

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

### ocx_sdk.InstallEnv.CA_BUNDLE

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

```python
CA_BUNDLE = 'OCX_INSTALL_CA_BUNDLE'
```

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

### ocx_sdk.InstallEnv.DIST_URL

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

```python
DIST_URL = 'OCX_INSTALL_DIST_URL'
```

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

### ocx_sdk.InstallEnv.FORCE

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

```python
FORCE = 'OCX_INSTALL_FORCE'
```

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

### ocx_sdk.InstallEnv.MIRROR_URL

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

```python
MIRROR_URL = 'OCX_INSTALL_MIRROR_URL'
```

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

### ocx_sdk.InstallEnv.QUIET

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

```python
QUIET = 'OCX_INSTALL_QUIET'
```

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

### ocx_sdk.InstallEnv.REPO

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

```python
REPO = 'OCX_INSTALL_REPO'
```

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

### ocx_sdk.InstallEnv.VERSION

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

```python
VERSION = 'OCX_INSTALL_VERSION'
```

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