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)查看贡献文件
在这里阅读许可证