1.4 KiB
1.4 KiB
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 wffrgpython -m venv .venvorpython3 -m venv .venv
- Activvate virtual environment
- MacOS/Linux:
. .venv/bin/active - Windows
- Command Prompt:
.venv\Scripts\activate.bat - Powershell:
.venv\Scripts\activate.ps1
- Command Prompt:
- MacOS/Linux:
- Install requirements
pip install -r requirements.txt
Configure
Copy .env-template as .env file and enter the following items:
ESPN_S2: S2 key from ESPNSWID: SWID key from ESPNLEAGUE_ID: League ID for your Fantasy League from ESPNFETCH_LEAGE: Generally, leave astrueunless you know what you're doing
For more information on how to retrieve these details, head on over to GitHub and review this discussion.
Execute
The following arguments are available and optional:
-woor--weekly-override: Provide a week (as anint) 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 8orpython app.py --weekly-override 8
Otherwise, for current week:
python app.py
End result will be a .csv file