Skip to content

About

Python library for live football scores, match stats, and league standings from multiple providers, including Sofascore, Promiedos, Goaloo, and FBref.

Topics

Resources

Stars

53 stars

Watchers

2 watching

Forks

Repository files navigation

EasySoccerData

PyPI - Version Pepy Total Downloads GitHub License GitHub Actions Workflow Status

A simple python package for extracting real-time soccer/football data from diverse online sources, providing essential statistics and insights.

Installation

pip install EasySoccerData

Development

git clone https://github.com/manucabral/EasySoccerData.git
cd EasySoccerData
pip install -e .[dev]

Usage

Sofascore

import esd

client = esd.SofascoreClient()
events = client.get_events(live=True)
for event in events:
    print(event)

How to search for matches, teams, tournaments, and players

How to get tournament brackets

How to get live match statistics

Check out Sofascore module examples

FBRef

import esd

client = esd.FBrefClient()
matchs = client.get_matchs()
for match in matchs:
    print(match)

Check out FBref module examples

Promiedos

import esd

client = esd.PromiedosClient()
events = client.get_events()
for event in events:
    print(event)

Check out Promiedos module examples

Goaloo

import esd

client = esd.GoalooClient()
league = client.get_league(36)          # 36 = English Premier League
standings = client.get_standings(36)
for row in standings[:5]:
    print(row.rank, row.team.name, row.points)

Check out Goaloo module examples

365Scores

import esd

client = esd.Scores365Client()
games = client.get_games("today")
standings = client.get_standings(72)    # 72 = Liga Profesional Argentina
for row in standings[0].rows[:5]:
    print(row.position, row.team.name, row.points)

Check out 365Scores module examples

Understat

import esd

client = esd.UnderstatClient()
matches = client.get_league_matches("EPL", 2024)
shots = client.get_match_shots(26602)

Check out Understat module examples

Transfermarkt

import esd

client = esd.TransfermarktClient()
player = client.get_player(28003)
print(player.name, player.market_value_display)
transfers = client.get_player_transfers(28003)

Check out Transfermarkt module examples

ESPN

import esd

client = esd.ESPNClient()
matches = client.get_scoreboard("arg.1")
standings = client.get_standings("arg.1")

Check out ESPN module examples

BeSoccer

import esd

client = esd.BeSoccerClient()
matches = client.get_matches("today")
standings = client.get_standings("torneo_final")

Check out BeSoccer module examples

Parallel fetching

Fetch multiple leagues or matches concurrently with fetch_many:

from functools import partial

import esd
from esd.utils import fetch_many

client = esd.GoalooClient()
standings = fetch_many(
    [partial(client.get_standings, league) for league in (36, 31, 8)]
)

Requests use a pooled HTTP session, cache recent responses briefly, and retry transient failures automatically.

Demo

Simple demonstration of a live table using Sofascore module (see source code)

Documentation

For the full documentation, please visit the Documentation Page

If you have any questions or need further assistance, feel free to open an issue.

Supported modules

Name PyPI version Repository version
Sofascore ✅ ✅
Promiedos ✅ ✅
FBRef ✅ ✅
Goaloo ✅ ✅
365Scores ✅ ✅
Understat ✅ ✅
Transfermarkt ✅ ✅
ESPN ✅ ✅
BeSoccer ✅ ✅

Keep in mind that it is still under active development.

Disclaimer

The data provided in this repository is gathered from various external sources and is intended solely for informational purposes. This software is distributed "as-is," without any warranties or guarantees. Users are solely responsible for ensuring that their use of this data complies with the terms of service of the respective data sources and all applicable laws.

The developers of this project assume no liability for any misuse, legal issues, or damages arising from the use of the data or software.

Contributions

All contributions, bug reports, fixes, and ideas are welcome.

About

Python library for live football scores, match stats, and league standings from multiple providers, including Sofascore, Promiedos, Goaloo, and FBref.

Topics

Resources

Stars

53 stars

Watchers

2 watching

Forks

Releases

Used by

Contributors

Languages