thescore-wrapper


Namethescore-wrapper JSON
Version 0.0.2 PyPI version JSON
download
home_pagehttps://github.com/tommhe14/thescore-wrapper
SummaryPython API wrapper for theScore undocumented API
upload_time2025-09-14 20:16:07
maintainerNone
docs_urlNone
authortommhe14
requires_python>=3.8
licenseMIT
keywords transfermarkt tmk football soccer fotmob sofascore flashscore api wrapper thescore espn
VCS
bugtrack_url
requirements aiohttp
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # TheScore API Wrapper

A comprehensive asynchronous Python wrapper for TheScore sports API, providing easy access to sports data including players, teams, matches, competitions, and more.

[![PyPI Downloads](https://static.pepy.tech/badge/thescore-wrapper)](https://pepy.tech/projects/thescore-wrapper)

## Features

- **Full API Coverage:** Access to all TheScore API endpoints

- **Async/Await Support:** Built on aiohttp for high performance

- **Type Annotations:** Full type hint support for better development experience

- **Error Handling:** Robust error handling and connection management

- **Flexible Search:** Advanced search capabilities with competition ID inclusion

## Installation

```bash
pip install thescore-wrapper
```

## Example usage

```py
import asyncio
from thescore import TheScore

async def main():
    async with TheScore() as ts:
        # Search for players
        players = await ts.search_players("LeBron", include_competition_id=True)
        print(f"Found {len(players)} players")
        
        # Get team information
        team = await ts.get_team("nba", 13)  # Miami Heat
        print(team.get("full_name"))
        
        # Get today's games
        from datetime import date
        games = await ts.get_games_by_date(date.today())
        print(f"Games today: {len(games)}")

asyncio.run(main())
```

## Complete API Reference

### Search Endpoints

| Method | Description | Example |
|--------|-------------|---------|
| `search(query, page, size)` | General search | `search("Lakers")` |
| `search_teams(query, page, size, include_competition_id)` | Team search | `search_teams("Heat", include_competition_id=True)` |
| `search_players(query, page, size, include_competition_id)` | Player search | `search_players("James", include_competition_id=True)` |
| `search_articles(query, page, size)` | News search | `search_articles("NBA finals")` |

### Club Endpoints

| Method | Description | Example |
|--------|-------------|---------|
| `get_team(competition, team_id)` | Team info | `get_team("nba", 13)` |
| `get_team_previous_fixtures(competition, team_id, count)` | Previous games| `get_team_previous_fixtures("nba", 13, 5)` |
| `get_team_current_fixtures(competition, team_id)` | Live games | `get_team_current_fixtures("nba", 13)` |
| `get_team_upcoming_fixtures(competition, team_id, count)` | Upcoming games | `get_team_upcoming_fixtures("nba", 13, 3)` |
| `get_team_full_schedule(competition, team_id)` | Full schedule | `get_team_full_schedule("nba", 13)` |
| `get_team_profile(team_id)` | Team profile | `get_team_profile(13)` |
| `get_team_squad(competition, team_id)` | Team roster | `get_team_squad("nba", 13)` |
| `get_team_injuries(competition, team_id)` | Team injuries | `get_team_injuries("nba", 13)` |


### Player Endpoints

| Method | Description | Example |
|--------|-------------|---------|
| `get_player(competition, player_id)` | Player info | `get_player("nba", 106844)` |
| `get_player_stats(competition, player_id)` | Player stats | `get_player_stats("nba", 106844)` |
| `get_player_summary(competition, player_id)` | Get participating clubs | `get_live_leagues()` |
| `get_games_by_date(game_date)` | 	Player summary | `get_player_summary("nba", 106844)` |


### Competition Endpoints

| Method | Description | Example |
|--------|-------------|---------|
| `get_standings(competition)` | Standings | `get_standings("nba")` |
| `get_live_leagues()` | Live leagues | `get_competition_transfers("GB1")` |
| `get_competition_clubs(competitionId: str)` | Get participating clubs | `get_live_leagues()` |
| `get_games_by_date(game_date)` | 	Games by date | `get_games_by_date(date.today())` |


### Match Endpoints

| Method | Description | Example |
|--------|-------------|---------|
| `get_match_timeline(competition, event_id)` | Match timeline | `get_match_timeline("nba", 89094)` |
| `get_match_info(competition, event_id)` | Match info | `get_match_info("nba", 89094)` |
| `get_match_lineups(competition, event_id)` | Lineups | `get_match_lineups("nba", 89094)` |
| `get_goalie_stats(competition, event_id)` | Goalie stats | `get_goalie_stats("nhl", 72229)` |
| `get_player_match_stats(competition, event_id)` | Player stats | `get_player_match_stats("nba", 72229)` |
| `get_match_play_by_play(competition, event_id)` | Play-by-play | `get_match_play_by_play("nba", 89094)` |
| `gget_match_betting(competition, event_id)` | Betting info | `get_match_betting("nba", 89094)` |


### Sport-Specific Endpoints

| Method | Description | Example |
|--------|-------------|---------|
| `get_baseball_summary(competition, event_id)` | Baseball summary | `get_baseball_summary("mlb", 64015)` |
| `get_tennis_match(competition, match_id)` | Tennis match | `get_tennis_match("wta", 162108)` |
| `get_motorsport_scoreboard(competition, event_id)` | Motorsport scores | `get_motorsport_scoreboard("nascar", 1556)` |
| `get_motorsport_qualifiers(competition, event_id)` | Motorsport qualifiers | `get_motorsport_qualifiers("nascar", 1556)` |

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/tommhe14/thescore-wrapper",
    "name": "thescore-wrapper",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "transfermarkt tmk football soccer fotmob sofascore flashscore api wrapper thescore espn",
    "author": "tommhe14",
    "author_email": "theckley@yahoo.co.uk",
    "download_url": "https://files.pythonhosted.org/packages/2e/69/bc6c8387db1afc09c139b15630f10116f0dcb540ce91724389441f72f39f/thescore_wrapper-0.0.2.tar.gz",
    "platform": null,
    "description": "# TheScore API Wrapper\n\nA comprehensive asynchronous Python wrapper for TheScore sports API, providing easy access to sports data including players, teams, matches, competitions, and more.\n\n[![PyPI Downloads](https://static.pepy.tech/badge/thescore-wrapper)](https://pepy.tech/projects/thescore-wrapper)\n\n## Features\n\n- **Full API Coverage:** Access to all TheScore API endpoints\n\n- **Async/Await Support:** Built on aiohttp for high performance\n\n- **Type Annotations:** Full type hint support for better development experience\n\n- **Error Handling:** Robust error handling and connection management\n\n- **Flexible Search:** Advanced search capabilities with competition ID inclusion\n\n## Installation\n\n```bash\npip install thescore-wrapper\n```\n\n## Example usage\n\n```py\nimport asyncio\nfrom thescore import TheScore\n\nasync def main():\n    async with TheScore() as ts:\n        # Search for players\n        players = await ts.search_players(\"LeBron\", include_competition_id=True)\n        print(f\"Found {len(players)} players\")\n        \n        # Get team information\n        team = await ts.get_team(\"nba\", 13)  # Miami Heat\n        print(team.get(\"full_name\"))\n        \n        # Get today's games\n        from datetime import date\n        games = await ts.get_games_by_date(date.today())\n        print(f\"Games today: {len(games)}\")\n\nasyncio.run(main())\n```\n\n## Complete API Reference\n\n### Search Endpoints\n\n| Method | Description | Example |\n|--------|-------------|---------|\n| `search(query, page, size)` | General search | `search(\"Lakers\")` |\n| `search_teams(query, page, size, include_competition_id)` | Team search | `search_teams(\"Heat\", include_competition_id=True)` |\n| `search_players(query, page, size, include_competition_id)` | Player search | `search_players(\"James\", include_competition_id=True)` |\n| `search_articles(query, page, size)` | News search | `search_articles(\"NBA finals\")` |\n\n### Club Endpoints\n\n| Method | Description | Example |\n|--------|-------------|---------|\n| `get_team(competition, team_id)` | Team info | `get_team(\"nba\", 13)` |\n| `get_team_previous_fixtures(competition, team_id, count)` | Previous games| `get_team_previous_fixtures(\"nba\", 13, 5)` |\n| `get_team_current_fixtures(competition, team_id)` | Live games | `get_team_current_fixtures(\"nba\", 13)` |\n| `get_team_upcoming_fixtures(competition, team_id, count)` | Upcoming games | `get_team_upcoming_fixtures(\"nba\", 13, 3)` |\n| `get_team_full_schedule(competition, team_id)` | Full schedule | `get_team_full_schedule(\"nba\", 13)` |\n| `get_team_profile(team_id)` | Team profile | `get_team_profile(13)` |\n| `get_team_squad(competition, team_id)` | Team roster | `get_team_squad(\"nba\", 13)` |\n| `get_team_injuries(competition, team_id)` | Team injuries | `get_team_injuries(\"nba\", 13)` |\n\n\n### Player Endpoints\n\n| Method | Description | Example |\n|--------|-------------|---------|\n| `get_player(competition, player_id)` | Player info | `get_player(\"nba\", 106844)` |\n| `get_player_stats(competition, player_id)` | Player stats | `get_player_stats(\"nba\", 106844)` |\n| `get_player_summary(competition, player_id)` | Get participating clubs | `get_live_leagues()` |\n| `get_games_by_date(game_date)` | \tPlayer summary | `get_player_summary(\"nba\", 106844)` |\n\n\n### Competition Endpoints\n\n| Method | Description | Example |\n|--------|-------------|---------|\n| `get_standings(competition)` | Standings | `get_standings(\"nba\")` |\n| `get_live_leagues()` | Live leagues | `get_competition_transfers(\"GB1\")` |\n| `get_competition_clubs(competitionId: str)` | Get participating clubs | `get_live_leagues()` |\n| `get_games_by_date(game_date)` | \tGames by date | `get_games_by_date(date.today())` |\n\n\n### Match Endpoints\n\n| Method | Description | Example |\n|--------|-------------|---------|\n| `get_match_timeline(competition, event_id)` | Match timeline | `get_match_timeline(\"nba\", 89094)` |\n| `get_match_info(competition, event_id)` | Match info | `get_match_info(\"nba\", 89094)` |\n| `get_match_lineups(competition, event_id)` | Lineups | `get_match_lineups(\"nba\", 89094)` |\n| `get_goalie_stats(competition, event_id)` | Goalie stats | `get_goalie_stats(\"nhl\", 72229)` |\n| `get_player_match_stats(competition, event_id)` | Player stats | `get_player_match_stats(\"nba\", 72229)` |\n| `get_match_play_by_play(competition, event_id)` | Play-by-play | `get_match_play_by_play(\"nba\", 89094)` |\n| `gget_match_betting(competition, event_id)` | Betting info | `get_match_betting(\"nba\", 89094)` |\n\n\n### Sport-Specific Endpoints\n\n| Method | Description | Example |\n|--------|-------------|---------|\n| `get_baseball_summary(competition, event_id)` | Baseball summary | `get_baseball_summary(\"mlb\", 64015)` |\n| `get_tennis_match(competition, match_id)` | Tennis match | `get_tennis_match(\"wta\", 162108)` |\n| `get_motorsport_scoreboard(competition, event_id)` | Motorsport scores | `get_motorsport_scoreboard(\"nascar\", 1556)` |\n| `get_motorsport_qualifiers(competition, event_id)` | Motorsport qualifiers | `get_motorsport_qualifiers(\"nascar\", 1556)` |\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python API wrapper for theScore undocumented API",
    "version": "0.0.2",
    "project_urls": {
        "Bug Reports": "https://github.com/tommhe14/thescore-wrapper",
        "Homepage": "https://github.com/tommhe14/thescore-wrapper",
        "Source": "https://github.com/tommhe14/thescore-wrapper"
    },
    "split_keywords": [
        "transfermarkt",
        "tmk",
        "football",
        "soccer",
        "fotmob",
        "sofascore",
        "flashscore",
        "api",
        "wrapper",
        "thescore",
        "espn"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "92f8481e31751e8a041d173d40d79e51afd1effbd2856990acd83123d3df7d1a",
                "md5": "0f09cf894864cbcd3315e67c1295f744",
                "sha256": "1a6e1b66ba2a3dd1a8264898bc0f45398ac9d7e4948a95304018746af5e12e57"
            },
            "downloads": -1,
            "filename": "thescore_wrapper-0.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0f09cf894864cbcd3315e67c1295f744",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 6190,
            "upload_time": "2025-09-14T20:16:05",
            "upload_time_iso_8601": "2025-09-14T20:16:05.829207Z",
            "url": "https://files.pythonhosted.org/packages/92/f8/481e31751e8a041d173d40d79e51afd1effbd2856990acd83123d3df7d1a/thescore_wrapper-0.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "2e69bc6c8387db1afc09c139b15630f10116f0dcb540ce91724389441f72f39f",
                "md5": "fe5132b7508863ea1df7fcc97cc5fef3",
                "sha256": "315172cd5dd2530474d197825b272cf931317b771ac430683f69dd58c9a506ca"
            },
            "downloads": -1,
            "filename": "thescore_wrapper-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "fe5132b7508863ea1df7fcc97cc5fef3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 5959,
            "upload_time": "2025-09-14T20:16:07",
            "upload_time_iso_8601": "2025-09-14T20:16:07.293827Z",
            "url": "https://files.pythonhosted.org/packages/2e/69/bc6c8387db1afc09c139b15630f10116f0dcb540ce91724389441f72f39f/thescore_wrapper-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-09-14 20:16:07",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "tommhe14",
    "github_project": "thescore-wrapper",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "aiohttp",
            "specs": [
                [
                    ">=",
                    "3.8.0"
                ]
            ]
        }
    ],
    "lcname": "thescore-wrapper"
}
        
Elapsed time: 4.84921s