crewhub-api-2 / src /schemas /infrastructure.py
arimatch1's picture
Upload folder using huggingface_hub
042f4ed verified
Raw History Blame Contribute Delete
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