Skip to content

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.

License

Notifications You must be signed in to change notification settings

jrandj/FPL-draft-picker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Python application to find better players for your team!

FPL-draft-picker

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.

Architecture

The package structure is shown below:

The class structure is shown below:

The diagrams have been generated using pyreverse:

pyreverse -o png .

Output

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.

Getting Started

Pre-requisites

  • Python 3.10.7

Installation

Use pipenv to install FPL-draft-picker.

  1. Create the virtual environment:

    pipenv install
  2. Activate the virtual environment:

    pipenv shell

To check for and update outdated packages run pipenv update --outdated. To uninstall run pipenv --rm.

Usage

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.

About

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.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published