# ESPN Weekly Fantasy Football Report Generator Generate a report using ESPN API for Python ## Install Required: Python 3.8 or greater - Clone this repository: `git clone https://forgejo.digitalhippo.tech/digital-hippo-labs/wffrg` - Create a virtual environment - `cd wffrg` - `python -m venv .venv` or `python3 -m venv .venv` - Activvate virtual environment - MacOS/Linux: `. .venv/bin/active` - Windows - Command Prompt: `.venv\Scripts\activate.bat` - Powershell: `.venv\Scripts\activate.ps1` - Install requirements - `pip install -r requirements.txt` ## Configure Copy `.env-template` as `.env` file and enter the following items: - `ESPN_S2`: S2 key from ESPN - `SWID`: SWID key from ESPN - `LEAGUE_ID`: League ID for your Fantasy League from ESPN - `FETCH_LEAGUE`: Generally, leave as `true` unless you know what you're doing For more information on how to retrieve these details, head on over to GitHub and [review this discussion](https://github.com/cwendt94/espn-api/discussions/150). ## Execute The following arguments are available and optional: - `-wo` or `--weekly-override`: Provide a week (as an `int`) to override data generation, default is current week. For example, if the current week is week 10 but I want data from week 8: - `python app.py -wo 8` or `python app.py --weekly-override 8` Otherwise, for current week: - `python app.py` End result will be a `.csv` file