Skip to content
ocx
install

Project (1 of 6)

Projectclassdataclass#

Re-exported from ocx_sdk._clientView source

removemethod#

def remove(*names: PackageLike, group: str | None = None, timeout: MaybeTimeout = UNSET, retry: MaybeRetry = UNSET) -> tuple[ToolRow, ...]

Remove tool bindings from ocx.toml.

Parameters

NameTypeDefaultDescription
*namesPackageLike()Binding names or fully-qualified identifiers.
groupstr | NoneNoneThe group to target. None searches every group and fails when a name appears in more than one.
timeoutMaybeTimeoutUNSETSeconds per attempt. Omitted takes the config’s.
retryMaybeRetryUNSETRetry policy. None opts out; omitted takes the config’s.

Returns

tuple[ToolRow, ...]
The lock rows the call wrote — empty when nothing changed.

spawn_asyncmethodasync#

async def spawn_async(argv: Sequence[str], *, names: Iterable[str] = (), groups: Iterable[str] = (), clean: bool = False, env: Mapping[str, EnvValue] | None = None, lazy_mode: LazyMode | None = None, pinned: bool | None = None, records_dir: str | Path | None = None, records_name: str | None = None, **popen_kw: Any) -> asyncio.subprocess.Process

Start a command in the project’s environment, on the event loop.

Parameters

NameTypeDefaultDescription
argvSequence[str]requiredThe command and its arguments. Must not be empty.
namesIterable[str]()Bindings to compose.
groupsIterable[str]()Groups to compose.
cleanboolFalseStrip the ambient parent environment before composing.
envMapping[str, EnvValue] | NoneNoneExtra [env] entries for this call.
lazy_modeLazyMode | NoneNoneWhen content downloads — now, or on first use.
pinnedbool | NoneNoneResolve through pinned digests — see exec.
records_dirstr | Path | NoneNoneWrite an execution record here — see exec.
records_namestr | NoneNoneThe record’s filename template — see exec.
**popen_kwAny{}Forwarded to the subprocess factory. args, shell, and executable are rejected.

Returns

asyncio.subprocess.Process
The running child.

Raises

ValueError
argv is empty, or a rejected keyword was passed.