A Python wrapper around the football-data API.
The recommended way to install football
is with pip
pip install football
You can also use pip to install football
directly from GitHub
pip install git+https://github.com/amosbastian/football.git
or you can install the project in "editable" mode like so
git clone https://github.com/amosbastian/football.git
cd football
pip install -e .
Currently the way to use football
is to instantiate a Football
class using your API key by either passing it directly or setting the environment variable FOOTBALL_API_KEY
, which can be requested here
from football import Football
football = Football("your_api_key")
manchester_united = football.team("Manchester United FC")
The following (sub) resources are available
# This year
competitions = football.competitions()
# Given year
competitions = football.competitions(2015)
teams = football.teams()
# Get the Premier League table
table = football.table("PL")
# Get the fixtures of the Premier League
fixtures = football.competition_fixtures("PL")
fixtures = football.fixtures()
fixture = football.fixture(159031)
# Get Manchester United's fixtures
fixtures = football.team_fixtures(66)
fixtures = football.team_fixtures("MUFC")
# Get Manchester United
team = football.team(66)
team = football.team("Manchester United FC")
# Get Manchester United's players
players = football.players(66)
players = football.players("ManU")
Please read CONTRIBUTING.md for details on how to contribute to football
and what the best way to go about this is!
See also the list of contributors who participated in this project.
This project is licensed under the AGPL-3.0 license - see the LICENSE file for details.