- integrations
- Python
- ocx_sdk
Project (3 of 6)
Projectclassdataclass#
Re-exported from
ocx_sdk._clientView sourcepathattributeinstance attribute#
path: Pathsession_configproperty#
session_config: OcxConfigThe OcxConfig this handle spawns under — see Ocx.session_config.
addmethod#
def add(*refs: PackageLike, group: str | None = None, pull: bool | None = None, platform: str | None = None, timeout: MaybeTimeout = UNSET, retry: MaybeRetry = UNSET) -> tuple[ToolRow, ...]Add tool bindings to ocx.toml.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
*refs | PackageLike | () | Identifiers, each optionally prefixed NAME=. |
group | str | None | None | The group to add to. None uses the implicit [tools]
table. |
pull | bool | None | None | Materialize the resolved packages. None leaves the
choice to ocx’s own default. |
platform | str | None | None | The platform to resolve against, as
os/arch[/variant][+feature]. |
timeout | MaybeTimeout | UNSET | Seconds per attempt. Omitted takes the config’s. |
retry | MaybeRetry | UNSET | Retry policy. None opts out; omitted takes the config’s. |
Returns
tuple[ToolRow, ...]- The lock rows the call wrote.
inspectmethod#
def inspect(*names: str, groups: Iterable[str] = (), platform: str | None = None, env: Mapping[str, EnvValue] | None = None, resolve: bool = False, closure: bool = False, timeout: MaybeTimeout = UNSET, retry: MaybeRetry = UNSET) -> InspectReportInspect the toolchain’s bindings and their resolution.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
*names | str | () | Binding names to inspect. Omitted inspects everything. |
groups | Iterable[str] | () | Groups to restrict to. |
platform | str | None | None | The platform to resolve against. |
env | Mapping[str, EnvValue] | None | None | Extra [env] entries for this call, as
KEY[:TYPE[:SEP]]=VALUE flags. |
resolve | bool | False | Add the pinned identifier, digest, layers, and the resolution chain. |
closure | bool | False | Add the dependency closure, its surface, and any
conflicts. Conflicting entrypoints raise DataError with
the payload attached to the error’s stderr. |
timeout | MaybeTimeout | UNSET | Seconds per attempt. Omitted takes the config’s. |
retry | MaybeRetry | UNSET | Retry policy. None opts out; omitted takes the config’s. |
Returns
InspectReport- The inspected packages and the composed
[env]entries.
statusmethod#
def status(timeout: MaybeTimeout = UNSET, retry: MaybeRetry = UNSET) -> StatusReportReport what ocx.toml and ocx.lock declare, resolving nothing.
A broken or stale lock is payload here, not failure: the call still exits 0 and the state shows up on the report.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
timeout | MaybeTimeout | UNSET | Seconds per attempt. Omitted takes the config’s. |
retry | MaybeRetry | UNSET | Retry policy. None opts out; omitted takes the config’s. |
Returns
StatusReport- The declared toolchain and the lock’s state.