https://github.com/tralahm/thesportsdb
Unofficial Python API client wrapper package around TheSportsDB.com API.An open, crowd-sourced database of sports artwork and metadata with a free API.
https://github.com/tralahm/thesportsdb
api-wrapper pypi-package readthedocs sports-data thesportsdb
Last synced: 7 months ago
JSON representation
Unofficial Python API client wrapper package around TheSportsDB.com API.An open, crowd-sourced database of sports artwork and metadata with a free API.
- Host: GitHub
- URL: https://github.com/tralahm/thesportsdb
- Owner: TralahM
- License: gpl-3.0
- Created: 2020-07-31T03:36:12.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2025-02-13T07:08:21.000Z (9 months ago)
- Last Synced: 2025-04-10T01:09:26.688Z (7 months ago)
- Topics: api-wrapper, pypi-package, readthedocs, sports-data, thesportsdb
- Language: Python
- Homepage:
- Size: 105 KB
- Stars: 37
- Watchers: 0
- Forks: 9
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.rst
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
[](https://travis-ci.com/TralahM/thesportsdb)
[](https://ci.appveyor.com/project/TralahM/thesportsdb)
[](https://ci.appveyor.com/project/TralahM/thesportsdb/branch/master)
[](https://thesportsdb.readthedocs.io/en/latest/?badge=latest)
[](https://opensource.org/licenses/GPLV2)
[](https://github.com/TralahTek)
[](http://dwyl.io/TralahM/thesportsdb)
[](https://github.com/TralahM/thesportsdb/pull/)
[](https://github.com/TralahM/thesportsdb/pull/)
[](https://github.com/TralahM)
# TheSportsDB Python SDK
Unofficial Python API client wrapper package around
[TheSportsDB API](https://thesportsdb.com).
An open, crowd-sourced database of sports artwork and metadata with a free API.
[](https://github.com/TralahTek)
[](https://github.com/TralahM)
[](https://github.com/TralahM)
# Documentation
[](https://thesportsdb.readthedocs.io/en/latest/)
# How to Install
```sh
# In terminal do:
pip install thesportsdb
```
## Building from Source for Developers
```sh
git clone https://github.com/TralahM/thesportsdb.git
cd thesportsdb
python setup.py build
pip install -e .
```
# QuickStart
By default the library will use the free TheSportsDB API. To use the premium
version you need to register at [TheSportsDB](https://thesportsdb.com/)
and get an API key.
Then you can set the API key to be used by the library as a shell environment
variable using `export THESPORTSDB_API_KEY=YOUR_API_KEY` before using the library.
```python
import thesportsdb
event_info=thesportsdb.events.eventInfo("1008672")
event_result=thesportsdb.events.eventResult("1008695")
previous_events=thesportsdb.events.lastLeagueEvents("4328")
events_for_league_season20192020=thesportsdb.events.leagueSeasonEvents("4328", "2019-2020")
upcoming_soccer_events=thesportsdb.events.nextLeagueEvents("4328")
all_countries=thesportsdb.countries.allCountries()
all_leagues=thesportsdb.leagues.allLeagues()
EPL_info=thesportsdb.leagues.leagueInfo("4328")
EPL_standings=thesportsdb.leagues.leagueSeasonTable("4328", "2019-2020")
soccer_leagues=thesportsdb.leagues.sportLeagues("102")
Team_sports=thesportsdb.sports.TeamVsTeamSports()
all_sports=thesportsdb.sports.allSports()
nonTeamSports=thesportsdb.sports.nonTeamVsTeamSports()
sport_details=thesportsdb.sports.sportInfo("102")
EPL_teams=thesportsdb.teams.leagueTeams("4328")
team_details_ManC=thesportsdb.teams.teamInfo("133613")
## print(thesportsdb)
```
# Contributing
[See the Contributing File](CONTRIBUTING.rst)
# LICENCE
[Read the LICENSE here](./LICENSE)
# Self-Promotion
[](https://twitter.com/TralahM)
[](https://github.com/TralahM)
[](https://kaggle.com/TralahM)
[](https://linkedin.com/in/TralahM)
[](https://tralahm.github.io)
[](https://tralahtek.com)