- integrations
- Python
- ocx_sdk
VersionInfo
VersionInfoclassdataclass#
Re-exported from
ocx_sdk._resultsView sourceclass VersionInfo(version: str, channel: str | None = None, cargo_pkg_version: str | None = None, commit: Mapping[str, Any] = _EMPTY, build: Mapping[str, Any] = _EMPTY, ci: Mapping[str, Any] = _EMPTY)ocx version under --format json.
Only version is guaranteed; everything else depends on how the binary was
built. The three sub-objects stay mappings on purpose — they are build
provenance, nothing in the SDK dispatches on their fields, and modelling
them would pin a schema ocx explicitly keeps open for extension.
Note that Ocx.version() reads the plain output instead: a bare semver
line is ocx’s documented stable contract (design §11).
buildattributeclass attributeinstance attribute#
build: Mapping[str, Any] = _EMPTYcargo_pkg_versionattributeclass attributeinstance attribute#
cargo_pkg_version: str | None = Nonechannelattributeclass attributeinstance attribute#
channel: str | None = Noneciattributeclass attributeinstance attribute#
ci: Mapping[str, Any] = _EMPTYcommitattributeclass attributeinstance attribute#
commit: Mapping[str, Any] = _EMPTYversionattributeinstance attribute#
version: strfrom_jsonmethodclassmethod#
def from_json(raw: str) -> VersionInfoParse ocx --format json version output.