- integrations
- Python
- ocx_sdk
Project, PackageCommands
PackageCommandsclassdataclass#
Re-exported from
ocx_sdk._clientView sourceclass PackageCommands(_runner: _Runner)The ocx package command group — machine tier.
Package operations act on the $OCX_HOME store and its candidate and
current symlinks. They take no project path and are CWD-independent by
construction; a path appears only where the CLI itself takes one.
Every method is multi-identifier native, mirroring the CLI’s PKG...
with one shared resolution.
Projectclassdataclass#
Re-exported from
ocx_sdk._clientView sourceenvmethod#
def env(groups: Iterable[str] = (), platform: str | None = None, env: Mapping[str, EnvValue] | None = None, pull: bool | None = None, lazy_mode: LazyMode | None = None, show_patches: bool = False, pinned: bool | None = None, timeout: MaybeTimeout = UNSET, retry: MaybeRetry = UNSET) -> EnvReportReport the environment the toolchain composes.
The report carries this handle’s host snapshot, so compose() stays
hermetic: a report produced under HostEnv.clean() composes against
nothing ambient unless you pass a different base.
Note that ocx’s env command takes no binding names — narrow with
groups instead.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
groups | Iterable[str] | () | Groups to compose. Omitted composes the default set. |
platform | str | None | None | The platform to resolve against. |
env | Mapping[str, EnvValue] | None | None | Extra [env] entries for this call. |
pull | bool | None | None | Materialize missing content first. None leaves the
choice to ocx’s own default. |
lazy_mode | LazyMode | None | None | When content downloads — now, or on first use. |
show_patches | bool | False | Include patch-contributed entries. |
pinned | bool | None | None | Resolve through the rendered toolchain’s pinned digests
rather than following its links — ocx’s --pinned /
--no-pinned. None leaves the choice to ocx.toml’s
pinned key, then OCX_TOOLCHAIN_PINNED, then ocx’s
default of following the links. |
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
EnvReport- The typed entries plus the binaries, entrypoints, integrations,
EnvReport- and advisories envelope.
updatemethod#
def update(*names: str, check_only: bool = False, groups: Iterable[str] = (), pull: bool | None = None, platform: str | None = None, timeout: MaybeTimeout = UNSET, retry: MaybeRetry = UNSET) -> tuple[ToolRow, ...] | NoneRe-resolve declared tags against the registry.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
*names | str | () | Binding names to advance; every other pin freezes. Omitted advances the whole file. |
check_only | bool | False | Compare the candidate lock to its predecessor and
write nothing — ocx’s --check. A changed pin raises
DataError. |
groups | Iterable[str] | () | Groups to advance. default is the implicit [tools]
table, all expands to every group. |
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. |
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, ...] | None- The lock rows written, or
Noneundercheck_only.