A Python application to find better players for your team!
FPL-draft-picker is a Python application for finding available players in the selected league that have a higher
projected score than players already in the selected team. This application uses APIs available from
draft.premierleague.com
to obtain player data and then matches against the projections from fantasyfootballscout.co.uk
.
The package structure is shown below:
The class structure is shown below:
The diagrams have been generated using pyreverse:
pyreverse -o png .
The output (sample available here) provides:
- Score predictions for the next H2H fixture.
- Players who have a higher six game projected score.
- Players who have a higher projected score in the next game week.
- Players who have a higher Influence, Creativity and Threat (ICT) index.
- Formation recommendations based on the projected score in the next game week.
- Python 3.10.7
Use pipenv to install FPL-draft-picker.
-
Create the virtual environment:
pipenv install
-
Activate the virtual environment:
pipenv shell
To check for and update outdated packages run pipenv update --outdated
. To uninstall run pipenv --rm
.
Run the script from the command line:
python fpldraft.py -leagueID <value> -teamName <value> -fantasyFootballScoutUsername <value> -fantasyFootballScoutPassword <value>
A file fpldraft_results_%Y%d%m-%H%M%S.html
will be created in the same directory.
Values for the parameters can be found as per the below:
- leagueID - This can be found by inspecting the HTTP GET request to the details endpoint (e.g.
draft.premierleague.com/api/league/<value>/details
) from the League tab in your browsers developer console. - teamName - The name of the team as shown at
draft.premierleague.com
. - fantasyFootballScoutUsername - Fantasy Football Scout username.
- fantasyFootballScoutPassword - Fantasy Football Scout password.