pysoccer
pysoccer copied to clipboard
I am a CLI for all european football data.
PySoccer - a CLI for all european football data.
Introduction
PySoccer is a CLI that get specific football data. Includes:
- competitions
- leagues
- teams
- players
- standings
- fixtures
Preparation
Get a API Key and activate it.
Install
Using pip
sudo pip install pysoccer
Set your API key in an environment variable SOCCER_CLI_API_TOKEN
For example:
export SOCCER_CLI_API_TOKEN="<YOUR_API_TOKEN>"
Note:
Only testing on Linux.
Usage
Get all competitions for current season
soccer --competition
Get all competitions for a season
soccer --competition --season 2015
Get all teams for a league
soccer --teams --league PD
Get all players for a team
soccer --players --team FCB
Get standings for a league (mini)
soccer --standings --league PD
Get standings for a league (full)
soccer --standings --league PD --fs
Get all fixtures for next 7 days
soccer --fixtures
Get all fixtures for next 3 days
soccer --fixtures --tf 3
Get all fixtures for previous 3 days
soccer --fixtures --tf -3
Get all fixtures for a league
soccer --fixtures --league PD
Get all fixtures for a league of a specific macth day
soccer --fixtures --league PD --md 33
Get all fixtures for a league of a specific macth day (next 2 days)
soccer --fixtures --league PD --md 33 -tf 2
Get historical fixtures for two team (default=10)
soccer --fixtures --id 153722
Get historical fixtures for two team (specific numbers)
soccer --fixtures --id 153722 --h2h 30
Output format
-
--stdout
: standard out format(default) -
--fs
: only for all standings data(except group game) -
--gs
: only for group game standings data -
--json
: json format(mini) -
--fjson
: json format(full) -
--gjson
: json format(only for group game and get standings data) -
-o
: only for--json
,--fjson
,--gjson
, save data.
Contribution
- Fork me
- Create a new branch from dev branch
- Add your code, comment, document and meaningful commit message
- Add yourself to CONTRIBUTION.md and describe your work
- PR to dev branch
Thanks all contributors!
You can see a list of contributors in CONTRIBUTIONS.md.
Acknowledgements
- Thanks Football-Data and her developers
- Thanks Soccer-cli and her developers
- Thanks Python language
- Thanks Atom and her developers
- Thanks Open Source
License
All code of Distance system are open source, based on MIT license.
See LICENSE.