Spaces:
Running
Running
Download app/core/response.py from basyx/MediaRouter: direct link, hf CLI and curl.
- Browser
- Download file 567 Bytes
-
https://huggingface.co/spaces/basyx/MediaRouter/resolve/main/app/core/response.py
- Command line
-
hf download hf://spaces/basyx/MediaRouter/app/core/response.py
-
curl -L -o response.py https://huggingface.co/spaces/basyx/MediaRouter/resolve/main/app/core/response.py
567 Bytes
| from __future__ import annotations | |
| from typing import Any | |
| from pydantic import BaseModel, ConfigDict, Field | |
| class ErrorBody(BaseModel): | |
| code: str | |
| message: str | |
| details: Any | None = None | |
| class ErrorResponse(BaseModel): | |
| success: bool = False | |
| request_id: str | |
| error: ErrorBody | |
| class SuccessResponse(BaseModel): | |
| model_config = ConfigDict(extra="forbid") | |
| success: bool = True | |
| request_id: str | |
| processing_time: float = Field(ge=0) | |
| download_url: str | None = None | |
| metadata: dict[str, Any] = Field(default_factory=dict) | |