Skip to content

Commit

Permalink
Update vgde.py
Browse files Browse the repository at this point in the history
  • Loading branch information
veddevv authored Nov 7, 2024
1 parent 5120f72 commit 1c3d524
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vgde.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@
# Constants
MAX_GAME_NAME_LENGTH = 100
GAME_NAME_PATTERN = r"^[a-zA-Z0-9\s]+$"
DEFAULT_REQUEST_TIMEOUT = 10

# Configure logging
logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s')

# Retrieve the RAWG API key from environment variables
API_KEY = os.getenv('RAWG_API_KEY')
BASE_URL = 'https://api.rawg.io/api'
REQUEST_TIMEOUT = int(os.getenv('REQUEST_TIMEOUT', 10)) # Default to 10 seconds if not set
REQUEST_TIMEOUT = int(os.getenv('REQUEST_TIMEOUT', DEFAULT_REQUEST_TIMEOUT))

class MissingAPIKeyError(Exception):
"""Custom exception for missing API key."""
Expand Down

0 comments on commit 1c3d524

Please sign in to comment.