Chrysostomos Nanakos 0250be3cf1
fix: rename node env vars from CODEX_ to STORAGE_ prefix
Signed-off-by: Chrysostomos Nanakos <chris@include.gr>
2026-03-30 16:08:46 +03:00

21 lines
391 B
Python

from pydantic import BaseModel
API_VERSION = "v1"
Cid = str
class Manifest(BaseModel):
cid: Cid
treeCid: Cid
datasetSize: int
blockSize: int
filename: str
mimetype: str
@staticmethod
def from_codex_api_response(response: dict) -> "Manifest":
return Manifest.model_validate(
dict(cid=response["cid"], **response["manifest"])
)