Metadata-Version: 2.4
Name: fs-football-fork
Version: 0.1.0
Summary: Fetch football data from FlashScore.com.
Project-URL: homepage, https://github.com/Simatwa/fs-football-fork
Project-URL: repository, https://github.com/Simatwa/fs-football-fork
Project-URL: documentation, https://github.com/Simatwa/fs-football-fork
Author-email: smartwa <smartwacaleb@gmail.com>
License-Expression: Unlicense
License-File: LICENSE
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: The Unlicense (Unlicense)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.10
Requires-Dist: about-time>=4.2.1
Requires-Dist: aiohttp>=3.8.5
Requires-Dist: aiosignal>=1.3.1
Requires-Dist: alive-progress>=3.1.4
Requires-Dist: async-timeout>=4.0.3
Requires-Dist: attrs>=23.1.0
Requires-Dist: beautifulsoup4>=4.12.2
Requires-Dist: bs4>=0.0.1
Requires-Dist: certifi>=2023.7.22
Requires-Dist: charset-normalizer>=3.2.0
Requires-Dist: frozenlist>=1.4.0
Requires-Dist: gevent>=23.9.1
Requires-Dist: grapheme>=0.6.0
Requires-Dist: greenlet>=3.0.0rc3
Requires-Dist: grequests>=0.7.0
Requires-Dist: idna>=3.4
Requires-Dist: multidict>=6.0.4
Requires-Dist: requests>=2.31.0
Requires-Dist: soupsieve>=2.5
Requires-Dist: urllib3>=2.0.5
Requires-Dist: yarl>=1.9.2
Requires-Dist: zope-event>=5.0
Requires-Dist: zope-interface>=6.0
Description-Content-Type: text/markdown

<div align="center">

# FlashScore Football Library

**Unofficial Python wrapper for flashscore.com**

[![PyPI version](https://badge.fury.io/py/fs-football-fork.svg)](https://pypi.org/project/fs-football-fork)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/fs-football-fork)](https://pypi.org/project/fs-football-fork)
![Coverage](https://raw.githubusercontent.com/Simatwa/fs-football-fork/refs/heads/main/assets/coverage.svg)
[![PyPI - License](https://img.shields.io/pypi/l/fs-football-fork)](https://pypi.org/project/fs-football-fork)
[![Downloads](https://pepy.tech/badge/fs-football-fork)](https://pepy.tech/project/fs-football-fork)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)

[Overview](#overview) • [Installation](#installation) • [Available Classes](#available-classes) • [Usage](#-usage)

This is a fork of [progeroffline/fs-football](https://github.com/progeroffline/fs-football)
</div

## Table of Contents

- [🌐 Languages](#languages)
- [📖 Overview](#overview)
- [🚀 Features](#features)
- [🛠 Installation](#installation)
- [🔍 Usage](#usage)
- [⚙️ Available Classes](#available-classes)
  - [StatValue](#statvalue)
  - [Odds](#odds)
  - [Event](#event)
  - [HistoryMatch](#historymatch)
  - [Match](#match)

## Languages

- [🇺🇸 English](README.md)
- [🇺🇦 Ukrainian](README-ua.md)

## Overview

This Python library allows you to easily fetch data about football matches from the FlashScore website (flashscore.com). It is designed for asynchronous operation, providing fast and efficient data retrieval. In some parts of the library, the `grequests` library is used to enhance performance.

## Features

- Asynchronous Data Retrieval: The library employs Python's asynchronous approach using the `asyncio` framework to make asynchronous HTTP requests, allowing for efficient data retrieval from FlashScore.

- Historical Match Data: Access to historical data about past football matches, including match results, team statistics, and top scorers.

## Installation

```shell
git clone https://github.com/progeroffline/fs-football
cd fs-football/
python3 -m venv venv
source venv/bin/activate
pip3 install -r requirements.txt
```

## Usage

Here is a simple example of using the library to fetch historical match data:

```python
from flashscore import FlashscoreApi

api = FlashscoreApi()
countries = api.get_countries()

for country in countries:
    leagues = country.get_leagues()

    for league in leagues:
        season = league.get_season()

        current_season = season[0]
        for match in current_season.get_matches():
            print(match)
            match.load_content()
            print(match)
```

Here is a simple example of using the library to fetch data about today's matches:

```python
from flashscore import FlashscoreApi

api = FlashscoreApi()
today_matches = api.get_today_matches()

for i, match in enumerate(today_matches):
    match.load_content()
```

## Available Classes

### StatValue 
Represents a statistical value in a match.
  - `name`: The name of the statistical value.
  - `home`: The value for the home team.
  - `away`: The value for the away team.

### Event
Represents an event in a match, such as a goal or a card.
  - `type`: The event type.
  - `player_name`: The name of the player involved in the event.
  - `player_url`: The URL associated with the player.
  - `time`: The time when the event occurred (optional).
  - `current_score`: The current score of the match (optional).
  - `second_player_name`: The name of the second player involved in the event (optional).
  - `second_player_url`: The URL associated with the second player (optional).
  - `description`: Additional description of the event (optional).

### HistoryMatch
Represents a historical match.
  - `id`: The unique identifier of the match.
  - `timestamp`: The timestamp of the match.
  - `date`: The date and time of the match.
  - `home_team_name`: The name of the home team.
  - `home_team_score`: The score of the home team.
  - `away_team_name`: The name of the away team.
  - `away_team_score`: The score of the away team.
  - `league_name`: The name of the league to which the match belongs.
  - `country`: The country in which the match took place.
  - `final_total_score`: The final total score of the match.
  - `main_team`: The main team in the match (optional).
  - `result_for_main_team`: The result for the main team (optional).

### Match
Represents a match, including its details and statistics.
  - `id`: The unique identifier of the match.
  - `country_name`: The name of the country where the match took place (optional).
  - `league_name`: The name of the league to which the match belongs (optional).
  - `timestamp`: The timestamp of the match (optional).
  - `date`: The date and time of the match (optional).
  - `tournament`: The name of the tournament (optional).
  - `home_team_name`: The name of the home team (optional).
  - `away_team_name`: The name of the away team (optional).
  - `home_team_score`: The score of the home team (optional).
  - `away_team_score`: The score of the away team (optional).
  - `final_total_score`: The final total score of the match (optional).
  - `status`: The match status (optional).
  - `stats_match`: A list of statistical values for the entire match.
  - `stats_first_half`: A list of statistical values for the first half.
  - `stats_second_half`: A list of statistical values for the second half.
  - `prematch_home_odds`: Odds for the home team before the match (optional).
  - `prematch_middle_odds`: Average odds before the match (optional).
  - `prematch_away_odds`: Odds for the away team before the match (optional).
  - `events`: A list of events that occurred during the match.
  - `home_matches`: A list of historical matches for the home team.
  - `away_matches`: A list of historical matches for the away team.
  - `head2head_matches`: A list of historical matches between these two teams.


