Files
kempe-backend/start_server.sh
Michael Simard ff0ca17b15 Fix Python 3.9 compatibility issues
Resolved startup errors:

1. Type hint compatibility:
   - Changed SkaterStatsDTO | GoalieStatsDTO to Union[SkaterStatsDTO, GoalieStatsDTO]
   - Python 3.9 does not support | operator for type unions

2. Yahoo Fantasy adapter import:
   - Made yfpy import lazy in get_fantasy_repository()
   - Prevents ModuleNotFoundError when yfpy not installed
   - Only loads Yahoo adapter when actually needed

3. Updated startup script for compatibility

The application now starts successfully on Python 3.9.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 22:49:48 -06:00

19 lines
572 B
Bash
Executable File

#!/bin/bash
# Startup script for Project Kempe Fantasy Hockey Backend
cd "$(dirname "$0")"
echo "=========================================="
echo "Project Kempe - Fantasy Hockey Backend"
echo "=========================================="
echo ""
echo "Starting FastAPI server..."
echo "Server will be available at: http://localhost:8000"
echo "API Documentation: http://localhost:8000/docs"
echo ""
echo "Press Ctrl+C to stop the server"
echo ""
# Start the server using python module
python3 -m uvicorn src.presentation.api.main:app --reload --host 0.0.0.0 --port 8000