项目作者: tvl

项目描述 :
Python wrapper for SportMonks Soccer API
高级语言: Python
项目地址: git://github.com/tvl/python-sportmonks.git
创建时间: 2017-06-02T06:02:59Z
项目社区:https://github.com/tvl/python-sportmonks

开源协议:Apache License 2.0

下载


python-sportmonks

Wrapper over the data provided SportMonks Soccer API

Installation

Install it yourself as:

  1. $ git clone git@github.com:tvl/python-sportmonks.git

Usage

The package has methods for gets some data from SportMonks.

  1. #/usr/bin/python
  2. from sportmonks import *
  3. token = '__YOURTOKEN__'
  4. init(token)
  5. # Continents
  6. print('Continents:')
  7. for a in continents():
  8. print(a['id'], a['name'])
  9. # Countries
  10. print('Countries:')
  11. for c in countries():
  12. print(c['id'], c['name'])
  13. # Leagues
  14. print('Leagues:')
  15. for l in leagues():
  16. print(l['id'], l['name'])
  17. # Seasons
  18. print('Seasons:')
  19. for s in seasons():
  20. print(s['id'], s['attributes']['name'])
  21. # Fixtures
  22. print('Fixtures:')
  23. for f in fixtures():
  24. print(f['id'], f['league_id'], f['season_id'])

If your have FREE PLAN your see:

  1. Continents:
  2. 1 Europe
  3. Countries:
  4. 320 Denmark
  5. 1161 Scotland
  6. Leagues:
  7. 271 Superliga
  8. 501 Premiership
  9. Seasons:
  10. 1273 2005/2006
  11. 1274 2006/2007
  12. 1275 2007/2008
  13. 1276 2008/2009
  14. 1277 2009/2010
  15. 1278 2010/2011
  16. 1279 2011/2012
  17. 1280 2012/2013
  18. 1281 2013/2014
  19. 1282 2014/2015
  20. 1286 2015/2016
  21. 759 2016/2017
  22. 1927 2005/2006
  23. 1928 2006/2007
  24. 1929 2007/2008
  25. 1930 2008/2009
  26. 1931 2009/2010
  27. 1932 2010/2011
  28. 1933 2011/2012
  29. 1934 2012/2013
  30. 1935 2013/2014
  31. 1936 2014/2015
  32. 1937 2015/2016
  33. 825 2016/2017