Find a file
2025-09-04 22:36:55 -07:00
.gitea/workflow Git workflow with Dockerfile 2024-09-30 23:02:36 -07:00
.env-template Update template 2024-09-30 23:59:38 -07:00
.gitignore Ignore service account credentials file 2024-09-28 16:30:39 -07:00
app.py Simplifying logic and updating names of functions for better description 2025-09-04 22:36:04 -07:00
config.py Added a smarter configuration file 2025-09-04 22:34:52 -07:00
Dockerfile Git workflow with Dockerfile 2024-09-30 23:02:36 -07:00
README.md Fix misspelling 2025-09-04 22:36:55 -07:00
requirements.txt Updated requirements, removing redis and huey dependencies 2025-09-04 22:35:14 -07:00
service.py Add service file 2024-09-28 16:31:41 -07:00

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.

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