Python API wrapper for theScore undocumented API
Project description
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.
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
pip install thescore-wrapper
Example usage
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) |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file thescore_wrapper-0.0.2.tar.gz.
File metadata
- Download URL: thescore_wrapper-0.0.2.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
315172cd5dd2530474d197825b272cf931317b771ac430683f69dd58c9a506ca
|
|
| MD5 |
fe5132b7508863ea1df7fcc97cc5fef3
|
|
| BLAKE2b-256 |
2e69bc6c8387db1afc09c139b15630f10116f0dcb540ce91724389441f72f39f
|
File details
Details for the file thescore_wrapper-0.0.2-py3-none-any.whl.
File metadata
- Download URL: thescore_wrapper-0.0.2-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a6e1b66ba2a3dd1a8264898bc0f45398ac9d7e4948a95304018746af5e12e57
|
|
| MD5 |
0f09cf894864cbcd3315e67c1295f744
|
|
| BLAKE2b-256 |
92f8481e31751e8a041d173d40d79e51afd1effbd2856990acd83123d3df7d1a
|