Live standings and upcoming fixtures, straight from the source.
Matchday is a Flask web app powered by the football-data.org API. Pick a league from the dropdown, from the Premier League to the FIFA World Cup, and instantly see the current standings table alongside upcoming fixtures, team crests included.
- 🏆 13 supported competitions, including the Premier League, La Liga, Serie A, Bundesliga, Ligue 1, Champions League, Copa Libertadores, and the FIFA World Cup
- 📊 Full standings table — position, played, won, drawn, lost, goal difference, and points, with team crests
- 📅 Upcoming fixtures list, showing match date and both competing teams with their crests
- 🔄 League switcher — change competitions instantly via a dropdown, no page reload logic needed beyond a simple GET request
- 🛡️ Graceful fallbacks — invalid competition codes default safely to the Premier League, and missing data shows a clean empty state instead of breaking the page
- 🔐 API key kept out of the code, loaded from an environment variable
- Python 3 + Flask — routing and server-side logic
- requests — calling the football-data.org API
- Jinja2 — server-side templating
- HTML5 / CSS3 — custom-styled dark-mode frontend, no CSS framework
- Google Fonts — JetBrains Mono (headings/data) & Inter (body)
- football-data.org — live football data API
matchday/
├── app.py # Flask application (API calls + routing)
├── templates/
│ └── index.html # Main page template (Jinja2)
├── static/
│ └── style.css # Stylesheet
└── README.md
pip install flask requests
- Sign up for a free account at football-data.org
- Copy your API key (token) from your account dashboard
Set the FOOTBALL_DATA_API_KEY environment variable before running the app:
export FOOTBALL_DATA_API_KEY="your_api_key_here"
(On Windows: set FOOTBALL_DATA_API_KEY=your_api_key_here)
git clone https://github.com/rhitamcoder/matchday.git
cd matchday
python app.py
The app will start in debug mode at http://127.0.0.1:5000/. Pick a league from the dropdown to see its standings and fixtures.
get_standings()calls the/competitions/{code}/standingsendpoint and extracts the"TOTAL"type table (as opposed to home-only or away-only splits)get_fixtures()calls the/competitions/{code}/matchesendpoint and returns the full matches list- Both functions fail safely: a missing API key, a failed request, or malformed JSON all return an empty list and print an error, rather than crashing the app
- The
home()route reads the selected competition from the query string, validates it against the knownCOMPETITIONSdictionary (defaulting to the Premier League if invalid), fetches standings and fixtures, and renders them into the page
The API key is read entirely from the FOOTBALL_DATA_API_KEY environment variable via os.getenv(). No key is hardcoded anywhere in the source, so nothing sensitive is included in this repo.
This project is licensed under the MIT License — see the LICENSE file for details.