datarobot_genai.drmcputils.panels.store
store
Server-side panel store.
Persists panels through a :class:~datarobot_genai.drmcputils.files.store.BlobStore:
each panel is a small JSON manifest blob (the panel metadata) tagged for
discovery, plus an optional separate payload blob for bulky content (a
Dataset's Parquet, a Chart's spec). The manifest blob's id is the panel id, so
no separate id allocation is needed and ids are globally unique.
The store depends only on the BlobStore Protocol, so it is backed by the
DataRobot Files API in production and by an in-memory fake in tests.
PanelStore
CRUD + listing for panels over a :class:BlobStore.
Source code in datarobot_genai/drmcputils/panels/store.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 | |
create
async
create(panel: BasePanel, *, source: str = DEFAULT_SOURCE, payload: bytes | None = None, payload_name: str | None = None, content_type: str | None = None) -> Panel
Persist panel (and an optional payload blob); returns it with id set.
Source code in datarobot_genai/drmcputils/panels/store.py
get
async
Load a panel by id (its manifest blob id). Payload is not hydrated here.
Source code in datarobot_genai/drmcputils/panels/store.py
list
async
list(*, source: str = DEFAULT_SOURCE, limit: int = DEFAULT_LIST_LIMIT, offset: int = 0) -> list[Panel]
List panels in source (metadata only); page with limit/offset.
Source code in datarobot_genai/drmcputils/panels/store.py
get_payload
async
Fetch a panel's payload blob bytes (by id or loaded panel); None if it has none.
Source code in datarobot_genai/drmcputils/panels/store.py
delete
async
Delete a panel's manifest and its payload blob (if any).
Transient fetch errors propagate (so the caller can retry without orphaning the payload); only an unreadable/corrupt manifest falls back to deleting the manifest alone, since the payload id is unknowable.