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!
Create classes for each (sub) resource- Add helper functions
- Improve the use of filters
- Add utilities for team/league/competition codes, names etc.
- Create proper documentation
- Include a CLI
- Amos Bastian - Initial work - @amosbastian
See also the list of contributors who participated in this project.
- Initial release - contains functions for each (sub) resource of the football-data API, including filtering
- All sub resources are now classes including functions to call retrieve additional information
- Team related functions can now use the name, shortname or code of the team instead of just its ID
- Football functions use classes instead
- Unit tests for each function changed to test respective classes
- Helper functions for Table and Team classes
This project is licensed under the AGPL-3.0 license - see the LICENSE file for details.
- Daniel Freitag - creator of the football-data API