Skip to content
ocx
install

PackageCommands (6 of 16)

PackageCommandsclassdataclass#

Re-exported from ocx_sdk._clientView source

receiptmethod#

def receipt(bundle: str | Path, *, timeout: MaybeTimeout = UNSET, retry: MaybeRetry = UNSET) -> BuildReceipt | None

Print the build receipt create wrote beside a bundle, if any.

Answers what push and test would fall back to for the flags a caller leaves out. Local and read-only — it touches no registry — so it keeps the session retry policy.

Parameters

NameTypeDefaultDescription
bundlestr | PathrequiredThe bundle archive create wrote.
timeoutMaybeTimeoutUNSETSeconds per attempt. Omitted takes the config’s.
retryMaybeRetryUNSETRetry policy. None opts out; omitted takes the config’s.

Returns

BuildReceipt | None
The receipt, or None when no receipt sits beside the bundle —
BuildReceipt | None
ocx’s exit 79, the ordinary state for a bundle handed over from
BuildReceipt | None
elsewhere, rather than an error here.

Raises

DataError
A receipt file that ocx cannot read (exit 65).

selectmethod#

def select(*refs: PackageLike, platform: str | None = None, timeout: MaybeTimeout = UNSET, retry: MaybeRetry = UNSET) -> InstallReport

Make an installed version the current one.

Parameters

NameTypeDefaultDescription
*refsPackageLike()Package identifiers.
platformstr | NoneNoneThe platform to resolve against.
timeoutMaybeTimeoutUNSETSeconds per attempt. Omitted takes the config’s.
retryMaybeRetryUNSETRetry policy. None opts out; omitted takes the config’s.

Returns

InstallReport
The selected packages, whose path names the current symlink.