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

*class* · *dataclass*

```python
class PackageDescription
```

Re-exported from: `ocx_sdk._results`

One package's description metadata, from `package description pull` (C-021, D4).

`api/data/package_description.rs`'s `Inner` — every field is optional
upstream, but carries no `skip_serializing_if`, so all three keys are
**always present and `null` when unset** — not absent-when-empty. D7
therefore wants `str | None` with no Python default, parsed via `_need`,
not `data.get()`. An all-`None` instance is still a real, valid value
either way: it is distinct from the `None` entry `InfoResult` uses when
the registry holds no description at all.

**Attributes**

- `title` (`str | None`) — The package's display title.
- `description` (`str | None`) — Its prose description.
- `keywords` (`str | None`) — A single delimited string upstream, **not** a list — do not split it into a collection here.

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

### ocx_sdk.PackageDescription.description

*attribute* · *instance attribute*

```python
description: str | None
```

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

### ocx_sdk.PackageDescription.keywords

*attribute* · *instance attribute*

```python
keywords: str | None
```

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

### ocx_sdk.PackageDescription.title

*attribute* · *instance attribute*

```python
title: str | None
```

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

### ocx_sdk.PackageDescription.from_dict

*method* · *classmethod*

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

Build from one non-`null` value of `package description pull`'s keyed object.

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