-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Install Python 3 according to your OS.. macOS comes with (deprecated) Python 2 installed. Install the current version of Python for ENFA.
Run the following command to install ENFA dependencies.
python3 -m pip install pandas gspread gspread-formatting espn-api simple-term-menu
Required Google gspread setup to allow pushing to Google Sheet. Do both "Enable API Access for a Project" and "For Bots: Using Service Account".
To install ENFA, run:
git clone https://github.com/martincham/espn-nba-fantasy-analyzer
This will copy the espn-nba-fantasy-analyzer folder into your current directory.
Inside your espn-nba-fantasy-analyzer folder run the tool with:
python3 main.py
Running this the first time will create a settings.txt. Edit the "leagueId" and "teamNumber". If your league is private, you also need SWID and espnS2. You can either edit settings.txt manually and rerun python3 main.py, or navigate to [4] Settings -> [1] Set ESPN info to set them inside the utility. (See this wiki page for more info on settings.txt and things you can customize.)
You first need your league ID from url:
and Team Number from League --> Members:
Make sure you have gspread setup.
First load your league:
ESPN Fantasy BBALL Analyzer
> [1] Load/Refresh League
[2] Google Sheets Menu
[3] Trade Machine
[4] Settings
[6] Exit
You should see a similar message if it worked:
ESPN Fantasy League: Basketball Heads
Season: 2025
Last refreshed: Wed Dec 18 20:41:05 2024
Now you can go into the Google Sheet menu and 1. Initialize and then 2. Push Google Sheet
Google Sheet:
[1] Push Google Sheet
> [2] Initialize/Reformat Google Sheet
[3] Clear Google Sheet
[4] Set Sheet Name
[6] Back