xgpy is a Python package that aims to aggregate multiple football data sources into a single python module. Using a single function, one can retrieve data from multiple sources, compare and perform a more complete analysis.
Source | Status |
---|---|
understat.com | Beta |
fbref.com | Tesing |
whoscored.com | In Progress |
fantasy.premierleague.com | Planned |
transfermarkt.us | Planned |
The source code is currently here.
The simplest way to install the package is by pip.
pip install xgpy
If you want to clone the repository instead:
git clone https://github.com/rkaahean/xgpy.git
To generate the requirements, use the following:
pipreqs xgpy/
I will probably start using pipenv
in the near future.
xgpy has multiple modules, each for every source. For example, in order to get stats from understat:
import xgpy
from xgpy.understat import UnderstatPlayer
player = UnderstatPlayer(1228)
match_data = player.get_player_match_data()
And that's it! Look through the documentation and call upon a number of functions.
All the documentation for the functions can be found at here.