- integrations
- Python
- ocx_sdk
PackageCommands (12 of 16)
PackageCommandsclassdataclass#
Re-exported from
ocx_sdk._clientView sourcespawn_asyncmethodasync#
async def spawn_async(refs: Sequence[PackageLike], argv: Sequence[str], *, platform: str | None = None, clean: bool = False, private: bool = False, env: Mapping[str, EnvValue] | None = None, lazy_mode: LazyMode | None = None, records_dir: str | Path | None = None, records_name: str | None = None, **popen_kw: Any) -> asyncio.subprocess.ProcessStart a command in a packages’ environment, on the event loop.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
refs | Sequence[PackageLike] | required | Package identifiers to compose. |
argv | Sequence[str] | required | The command and its arguments. Must not be empty. |
platform | str | None | None | The platform to resolve against. |
clean | bool | False | Strip the ambient parent environment before composing. |
private | bool | False | Compose the private surface — ocx’s --self. |
env | Mapping[str, EnvValue] | None | None | Extra [env] entries for this call. |
lazy_mode | LazyMode | None | None | When content downloads — now, or on first use. |
records_dir | str | Path | None | None | Write an execution record — the resolved closure
and executable — under this directory. None leaves it to
[records] dir and OCX_RECORDS_DIR; with none of the
three, no record is written. |
records_name | str | None | None | The record’s filename template, over {time},
{host}, {pid} and {rand}. None leaves it to
[records] name and OCX_RECORDS_NAME. |
**popen_kw | Any | {} | Forwarded to the subprocess factory. args,
shell, and executable are rejected. |
Returns
asyncio.subprocess.Process- The running child.
Raises
ValueErrorargvis empty, or a rejected keyword was passed.
uninstallmethod#
def uninstall(*refs: PackageLike, deselect: bool = False, purge: bool = False, timeout: MaybeTimeout = UNSET, retry: MaybeRetry = UNSET) -> tuple[RemovalResult, ...]Remove installed candidates.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
*refs | PackageLike | () | Package identifiers. |
deselect | bool | False | Also drop the current symlink. |
purge | bool | False | Delete the object from the store once nothing references it. |
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[RemovalResult, ...]- One row per removal.