Files
soleprint/soleprint/artery/veins/google/core/config.py
buenosairesam c4e702eae3 refactor: unified google vein, prefixed module loading, cfg separation
- Unified google vein with OAuth + Sheets API
- Prefixed vein module loading (vein_google) to avoid pip package shadowing
- Preload pip packages before vein loading
- Added common/auth framework
- Rebranded sbwrapper from Pawprint to Soleprint
- Removed cfg/ from history (now separate repo)
- Keep cfg/standalone/ as sample configuration
- gitignore cfg/amar/ and cfg/dlt/ (private configs)
2026-01-27 09:24:05 -03:00

41 lines
1.0 KiB
Python

"""
Google OAuth2 configuration loaded from .env file.
"""
from pathlib import Path
from pydantic_settings import BaseSettings
ENV_FILE = Path(__file__).parent.parent / ".env"
# OpenID scopes for identity verification
IDENTITY_SCOPES = [
"openid",
"https://www.googleapis.com/auth/userinfo.email",
"https://www.googleapis.com/auth/userinfo.profile",
]
# API scopes for data access (Sheets, Drive)
API_SCOPES = [
"https://www.googleapis.com/auth/spreadsheets.readonly",
"https://www.googleapis.com/auth/drive.readonly",
]
class GoogleConfig(BaseSettings):
google_client_id: str = ""
google_client_secret: str = ""
google_redirect_uri: str = "http://localhost:12000/artery/google/oauth/callback"
# Default to identity-only scopes; add API scopes when needed
google_scopes: str = " ".join(IDENTITY_SCOPES)
api_port: int = 8003
model_config = {
"env_file": ENV_FILE,
"env_file_encoding": "utf-8",
"extra": "ignore",
}
settings = GoogleConfig()