Connecting local program to Twitch dev-portal credentials

This commit is contained in:
2025-11-17 00:19:13 +01:00
parent 60417d4594
commit 264e4c276d
4 changed files with 123 additions and 1 deletions

18
config.py Normal file
View File

@@ -0,0 +1,18 @@
import os
from dotenv import load_dotenv
# Load environment variables from .env file
load_dotenv()
class Settings:
"""
A simple class to hold all application settings, loaded from environment variables.
"""
ENCRYPTION_KEY: str = os.getenv("ENCRYPTION_KEY")
TWITCH_CLIENT_ID: str = os.getenv("TWITCH_CLIENT_ID")
TWITCH_CLIENT_SECRET: str = os.getenv("TWITCH_CLIENT_SECRET")
# The full URL where our app is running, needed for the redirect_uri
APP_BASE_URL: str = "http://localhost:8000" # Update for production
settings = Settings()