fpl
A Python wrapper around the Fantasy Premier League API.
https://github.com/amosbastian/fpl
https://github.com/amosbastian/fpl/pull/11
# installation
pip install fpl
# upgrading
pip install fpl --upgrade
Usage: fpl [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
myteam Echoes a logged in user's team to the terminal.
picks Echoes a user's picks to the terminal.
One of the items in my roadmap for fpl was adding a CLI, so I decided to start implementing that. It includes two commands so far, myteam and picks, which show a user's team and picks respectively. ANSI colour codes are used to colour the players depending on their status, and PTable is used to format some additional information in an aesthetically pleasing way.
myteam commandAs mentioned in my previous post, to see a user's current team, you need to be logged in as the user (otherwise people could just copy your team). So, this command echoes a user's team to the terminal, which also includes additional information about a user's overall performance, after the user has logged in. If a wrong email address or password is entered this is shown as an error, and if a user has the FPL_EMAIL and FPL_PASSWORD environment variables set then they don't need to log in.
picks commandThis command echoes a user's picks to the terminal, which includes additional information about their performance in the current gameweek. It does not require the user to be logged in to see this information, so you can enter any user's ID that you want to. In comparison to the myteam command it shows the points scored by each player in the current gameweek.
Yesterday someone created an issue about a failure to import module(s). In this update this has hopefully also been fixed (it works for me), but I am waiting to hear back from him to confirm this is also the case for him.
I have a couple of commands / things I want to add to the CLI:
beempy importaccountIf you have any thoughts about this please let me know. Especially ideas for new commands or suggestions to improve existing ones are very much appreciated!