read_record
read_record(path)A record back off disk. Plain data; from_dict(record["specification"]) runs it.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| path | str | Path | The run.json to read. |
required |
Returns
| Name | Type | Description |
|---|---|---|
| dict[str, Any] | The record as plain data: specification, pyplatypus, history, and derived |
|
| dict[str, Any] | if the run had any. Nothing is reconstructed into objects, because the record is a | |
| dict[str, Any] | description of what happened and not a live thing. |
import json, pathlib, tempfile path = pathlib.Path(tempfile.mkdtemp()) / “run.json” _ = path.write_text(json.dumps({“pyplatypus”: “0.7.0a1”, “history”: []})) read_record(path)[“pyplatypus”] ‘0.7.0a1’