thesportsdb
1.0.0
thesportsdb api周圍的非官方Python API客戶包裝包。一個開放的體育藝術品和元數據的開放式人群數據庫,並提供免費的API。
# In terminal do:
pip install thesportsdbgit clone https://github.com/TralahM/thesportsdb.git
cd thesportsdb
python setup.py build
pip install -e .默認情況下,庫將使用免費的thesportsdb api。要使用高級版本,您需要在thesportsdb註冊並獲取API密鑰。
然後,您可以使用export THESPORTSDB_API_KEY=YOUR_API_KEY在使用庫之前將庫將API密鑰設置為要用作Shell環境變量的API鍵。
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)查看貢獻文件
在這裡閱讀許可證