Spaces:
Paused
Paused
Download src/schemas/infrastructure.py from arimatch1/crewhub-api-2: direct link, hf CLI and curl.
- Browser
- Download file 918 Bytes
-
https://huggingface.co/spaces/arimatch1/crewhub-api-2/resolve/main/src/schemas/infrastructure.py
- Command line
-
hf download hf://spaces/arimatch1/crewhub-api-2/src/schemas/infrastructure.py
-
curl -L -o infrastructure.py https://huggingface.co/spaces/arimatch1/crewhub-api-2/resolve/main/src/schemas/infrastructure.py
918 Bytes
| # Copyright (c) 2026 CrewHub. All rights reserved. | |
| # Proprietary and confidential. See LICENSE for details. | |
| from datetime import datetime | |
| from pydantic import BaseModel | |
| class MetricSnapshot(BaseModel): | |
| name: str | |
| label: str | |
| value: float | |
| limit: float | None | |
| percent: float | None | |
| status: str # "green" | "yellow" | "red" | |
| display_value: str | |
| display_limit: str | None | |
| upgrade_trigger: str | None | |
| upgrade_url: str | None | |
| metadata: dict | None = None | |
| class InfrastructureCurrentResponse(BaseModel): | |
| collected_at: datetime | None | |
| metrics: list[MetricSnapshot] | |
| class HistoryPoint(BaseModel): | |
| date: str | |
| value: float | |
| class Projection(BaseModel): | |
| days_until_limit: int | None | |
| estimated_date: str | None | |
| class InfrastructureHistoryResponse(BaseModel): | |
| metric: str | |
| limit: float | None | |
| points: list[HistoryPoint] | |
| projection: Projection | |