Download app/config.py from quickbin/hfdeploy: direct link, hf CLI and curl.
- Browser
- Download file 599 Bytes
-
https://huggingface.co/spaces/quickbin/hfdeploy/resolve/main/app/config.py
- Command line
-
hf download hf://spaces/quickbin/hfdeploy/app/config.py
-
curl -L -o config.py https://huggingface.co/spaces/quickbin/hfdeploy/resolve/main/app/config.py
599 Bytes
| from functools import lru_cache | |
| from pydantic_settings import BaseSettings, SettingsConfigDict | |
| from pydantic import Field | |
| from pathlib import Path | |
| BASE_DIR = Path(__file__).resolve().parent.parent | |
| class Settings(BaseSettings): | |
| """Global configuration loaded from environment variables.""" | |
| redis_url: str = Field("redis://localhost:6379") | |
| api_key: str = Field("123456") | |
| model_config = SettingsConfigDict( | |
| env_file = BASE_DIR / ".env", | |
| env_file_encoding = "utf-8", | |
| ) | |
| def get_settings() -> Settings: | |
| return Settings() | |