Download lib/python3.13/site-packages/fastapi_cloud_cli/config.py from michaelwaves/vllm-steer-venv: direct link, hf CLI and curl.
- Browser
- Download file 686 Bytes
-
https://huggingface.co/datasets/michaelwaves/vllm-steer-venv/resolve/main/lib/python3.13/site-packages/fastapi_cloud_cli/config.py
- Command line
-
hf download hf://datasets/michaelwaves/vllm-steer-venv/lib/python3.13/site-packages/fastapi_cloud_cli/config.py
-
curl -L -o config.py https://huggingface.co/datasets/michaelwaves/vllm-steer-venv/resolve/main/lib/python3.13/site-packages/fastapi_cloud_cli/config.py
686 Bytes
| import json | |
| from pathlib import Path | |
| from pydantic import BaseModel | |
| from .utils.config import get_cli_config_path | |
| class Settings(BaseModel): | |
| base_api_url: str = "https://api.fastapicloud.com/api/v1" | |
| client_id: str = "fastapi-cli" | |
| def from_user_settings(cls, config_path: Path) -> "Settings": | |
| try: | |
| content = config_path.read_bytes() if config_path.exists() else b"{}" | |
| user_settings = json.loads(content) | |
| except json.JSONDecodeError: | |
| user_settings = {} | |
| return cls(**user_settings) | |
| def get(cls) -> "Settings": | |
| return cls.from_user_settings(get_cli_config_path()) | |