Spaces:
No application file
No application file
Download 5839295f/models.py from WealthFromAI/multi-cloud-cost-optimization-api-5839: direct link, hf CLI and curl.
- Browser
- Download file 1.32 kB
-
https://huggingface.co/spaces/WealthFromAI/multi-cloud-cost-optimization-api-5839/resolve/main/5839295f/models.py
- Command line
-
hf download hf://spaces/WealthFromAI/multi-cloud-cost-optimization-api-5839/5839295f/models.py
-
curl -L -o models.py https://huggingface.co/spaces/WealthFromAI/multi-cloud-cost-optimization-api-5839/resolve/main/5839295f/models.py
1.32 kB
| from pydantic import BaseModel, Field | |
| from typing import Optional | |
| from datetime import datetime | |
| class ItemCreate(BaseModel): | |
| name: str = Field(..., min_length=1, max_length=200, description="Item name") | |
| description: Optional[str] = Field(None, max_length=2000) | |
| category: Optional[str] = Field(None, max_length=100) | |
| tags: list[str] = Field(default_factory=list) | |
| metadata: dict = Field(default_factory=dict) | |
| model_config = {"json_schema_extra": {"example": { | |
| "name": "Sample Item", | |
| "description": "A sample devops_infra item", | |
| "category": "default", | |
| "tags": ["devops_infra"], | |
| "metadata": {}, | |
| }}} | |
| class ItemUpdate(BaseModel): | |
| name: Optional[str] = Field(None, min_length=1, max_length=200) | |
| description: Optional[str] = Field(None, max_length=2000) | |
| category: Optional[str] = None | |
| tags: Optional[list[str]] = None | |
| metadata: Optional[dict] = None | |
| class ItemResponse(BaseModel): | |
| id: str | |
| name: str | |
| description: Optional[str] | |
| category: Optional[str] | |
| tags: list[str] | |
| metadata: dict | |
| created_by: str | |
| created_at: str | |
| updated_at: str | |
| class HealthResponse(BaseModel): | |
| status: str | |
| service: str | |
| version: str | |
| timestamp: str | |
| items_count: int | |