You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
849 B
Python
23 lines
849 B
Python
|
1 day ago
|
from pydantic_settings import BaseSettings, SettingsConfigDict
|
||
|
|
|
||
|
|
class Settings(BaseSettings):
|
||
|
|
model_config = SettingsConfigDict(env_file=".env", env_file_encoding="utf-8")
|
||
|
|
|
||
|
|
APP_NAME: str = "Google Workspace Hub"
|
||
|
|
DATABASE_URL: str = "sqlite:///./app.db"
|
||
|
|
|
||
|
|
GOOGLE_CLIENT_SECRET_FILE: str = "credentials/client_secret.json"
|
||
|
|
GOOGLE_REDIRECT_URI: str = "http://127.0.0.1:8000/auth/google/callback"
|
||
|
|
GOOGLE_SCOPES: str = (
|
||
|
|
"openid email profile "
|
||
|
|
"https://www.googleapis.com/auth/gmail.send "
|
||
|
|
"https://www.googleapis.com/auth/gmail.readonly "
|
||
|
|
"https://www.googleapis.com/auth/classroom.courses.readonly "
|
||
|
|
"https://www.googleapis.com/auth/calendar.events"
|
||
|
|
)
|
||
|
|
|
||
|
|
def scopes_list(self) -> list[str]:
|
||
|
|
return [s for s in self.GOOGLE_SCOPES.split() if s.strip()]
|
||
|
|
|
||
|
|
settings = Settings()
|