Skip to main content
Glama
hsgui
by hsgui
config.py942 B
from __future__ import annotations from functools import lru_cache from pathlib import Path from pydantic import Field from pydantic_settings import BaseSettings, SettingsConfigDict BASE_DIR = Path(__file__).resolve().parents[2] DEFAULT_DB_PATH = BASE_DIR / "storage" / "daily_work.db" class Settings(BaseSettings): """Central application configuration loaded from environment variables.""" app_name: str = "Daily Work MCP Server" database_path: Path = Field(default=DEFAULT_DB_PATH) summary_separator: str = " \u00b7 " model_config = SettingsConfigDict( env_file=".env", env_file_encoding="utf-8", extra="ignore", ) @property def database_url(self) -> str: return f"sqlite:///{self.database_path}" @lru_cache(maxsize=1) def get_settings() -> Settings: settings = Settings() settings.database_path.parent.mkdir(parents=True, exist_ok=True) return settings

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/hsgui/daily-work-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server