Skip to main content

fusion-stat

A football data scraper that can scrape data from multiple sources simultaneously.

Installation

pip install fusion-stat

Usage

from fusion_stat import App

You can use it like this

async with App() as app:
    competitions = await app.get_competitions()

or

app = App()
competitions = await app.get_competitions()
await app.close()
params = competitions.get_params()
pl_params = next(params)
pl_params
{'fotmob_id': '47',
 'fbref_id': '9',
 'fbref_path_name': 'Premier-League',
 'official_name': 'Premier League',
 'transfermarkt_id': 'GB1',
 'transfermarkt_path_name': 'premier-league'}

The client uses httpx.AsyncClient, you can also customize parameters.

import httpx

client = httpx.AsyncClient()
async with App(client=client) as app:
    competition = await app.get_competition(**pl_params)
competition.info
{'id': '47',
 'name': 'Premier League',
 'logo': 'https://www.premierleague.com/resources/rebrand/v7.129.2/i/elements/pl-main-logo.png',
 'type': 'league',
 'season': '2023/2024',
 'country_code': 'ENG',
 'names': {'Premier League'},
 'market_values': '€11.09bn',
 'player_average_market_value': '€20.85m'}
competition.teams[1]
{'id': '8650',
 'name': 'Liverpool',
 'names': {'Liverpool'},
 'played': 28,
 'wins': 19,
 'draws': 7,
 'losses': 2,
 'goals_for': 65,
 'goals_against': 26,
 'points': 64,
 'country_code': 'ENG',
 'market_values': '€921.40m',
 'logo': 'https://resources.premierleague.com/premierleague/badges/rb/t14.svg',
 'shooting': {'shots': 534, 'xg': 62.6}}

Metadata

Release files for fusion-stat 0.0.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fusion-stat 0.0.11
File Size Uploaded
fusion_stat-0.0.11.tar.gz 18.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fusion-stat 0.0.11
File Interpreter ABI Platform
fusion_stat-0.0.11-py3-none-any.whl Python 3 none any Details

Total release size: 50.4 kB

Release files / fusion_stat-0.0.11.tar.gz

Download URL fusion_stat-0.0.11.tar.gz
Size 18.0 kB
Tags Source
SHA-256 checksum
How to use checksums
98f70f216f3b9470b8f2b9e8f598b9ad718884813108d43da29bdc86452a8b25
BLAKE2b-256 checksum
How to use checksums
1ab82d1e1d128d8ff6dbadf603ba3a526c1829ed61cb423f826d6bd459af45b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.2 CPython/3.11.0 Linux/6.5.0-1017-azure

Release files / fusion_stat-0.0.11-py3-none-any.whl

Download URL fusion_stat-0.0.11-py3-none-any.whl
Size 32.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
38d5d41433b80d40941b869c2008786ff354a79f1c5ecc24a72c7d024bab20f5
BLAKE2b-256 checksum
How to use checksums
abf74d933c48ac279ca1490033958bea57f4e068275c269c668eb3a83eda365c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.2 CPython/3.11.0 Linux/6.5.0-1017-azure

Release history Release notifications | RSS feed

This release

0.0.11 This release

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page