项目作者: conormag94

项目描述 :
Python cli to retrieve football (soccer) data
高级语言: Python
项目地址: git://github.com/conormag94/pyscores.git
创建时间: 2015-10-15T20:42:42Z
项目社区:https://github.com/conormag94/pyscores

开源协议:MIT License

下载


Pyscores: Football scores and data in your terminal

Build Status
PyPI version

Pyscores is a command line based python program to get football fixtures, results and standings.

This is a work in progress. It was inspired by another trending repo I saw on github. I wanted to see if I could do my own implementation of it, as a learning exercise.

Tested in Python 2.7 and >=3.3

Setup

To use this you will need an api key from api.football-data.org. Without this the program will still work but will be limited to 50 requests per day.

Once you have your key, you must set an environment variable called PYSCORES_KEY so the program can use it.

To install (with pip):

  1. pip install pyscores

To Verify installation:

  1. scores --help

Usage

Recent results

  1. scores results --league=PL
  1. scores results -l PL

where PL is the league code for the Premier League

alt text

Fixtures for next matchday

  1. scores fixtures --league=PL
  1. scores fixtures -l PL

alt text

Specifying number of days for Fixtures or Results

  1. scores results --league=PL --days=20
  1. scores results -l PL -d 20

The days argument is optional and will default to 7 if not specified.

League standings

  1. scores standings --league=PL
  1. scores standings -l PL

alt text

League codes

League Code League Name
BSA Campeonato Brasileiro da Série A
PL Premier League
ELC Championship
EL1 League One
EL2 League Two
DED Eredivisie
FL1 Ligue 1
FL2 Ligue 2
BL1 1. Bundesliga
BL2 2. Bundesliga
PD Primera Division (La Liga)
SA Serie A
SB Serie B
PPL Primeira Liga
DFB DFB-Pokal
CL Champions League
AAL Australian A-League

Dependencies

  • click
  • requests
  • tabulate
  • termcolor