Skip to content
ocx
install

CommandResult, ConfigSetupReport

CommandResultclassdataclass#

Re-exported from ocx_sdk._resultsView source
class CommandResult(argv: tuple[str, ...], exit_code: int, stdout: str, stderr: str)

The outcome of one ocx process, before any typing.

What invoke() returns and what every typed method is built on.

Attributes

NameTypeDescription
argvtuple[str, ...]The argv that ran, with secrets already redacted by _process.
exit_codeintThe exit status. int, not ExitCode: a child killed by a signal reports a code ocx never assigns.
stdoutstrRaw stdout — JSON text for a --format json call.
stderrstrCaptured stderr in full, redacted.

argvattributeinstance attribute#

argv: tuple[str, ...]

exit_codeattributeinstance attribute#

exit_code: int

stderrattributeinstance attribute#

stderr: str

stdoutattributeinstance attribute#

stdout: str

ConfigSetupReportclassdataclass#

Re-exported from ocx_sdk._resultsView source
class ConfigSetupReport(status: str)

ocx config setup — the managed_config block of self setup’s report.

ocx wraps the block in an envelope; the SDK flattens it, because the envelope has exactly one key and a ConfigSetupReport.managed_config.status chain says nothing .status does not.

Attributes

NameTypeDescription
statusstrWhat the run did or would do, e.g. "would_adopt".

statusattributeinstance attribute#

status: str

from_jsonmethodclassmethod#

def from_json(raw: str) -> ConfigSetupReport

Parse ocx --format json config setup output.