- integrations
- Python
- ocx_sdk
BuildReceipt
BuildReceiptclassdataclass#
ocx_sdk._resultsView sourceclass BuildReceipt(platform: str | None = None, identifier: str | None = None)The <bundle-stem>-receipt.json sidecar ocx package create writes.
ocx package receipt <bundle> prints what create was told — the
platform it resolved against and the identifier the bundle will publish
under — so push and test need not restate either. Both keys are
absent when the build recorded neither, never null, so both are read
with .get.
The receipt file itself (<stem>-receipt.json, build_receipt.rs) is
ocx’s; this SDK never reads it directly. Its format version stays behind
the command, which answers exit 65 for a file it cannot read and exit 79
for a bundle with no receipt beside it.
Attributes
| Name | Type | Description |
|---|---|---|
platform | str | None | The --platform recorded, canonical grammar, when given. |
identifier | str | None | The --identifier recorded, resolved against the
default registry, when given. |
identifierattributeclass attributeinstance attribute#
identifier: str | None = Noneplatformattributeclass attributeinstance attribute#
platform: str | None = Nonerefproperty#
ref: PackageRef | NoneThe recorded identifier as a PackageRef, or None when none was recorded.
from_dictmethodclassmethod#
def from_dict(data: Mapping[str, Any]) -> BuildReceiptBuild from the decoded report.
from_jsonmethodclassmethod#
def from_json(raw: str) -> BuildReceiptParse ocx --format json package receipt output.