All Projects → evansloan → sports.py

evansloan / sports.py

Licence: MIT license
A simple Python package to gather live sports scores

Programming Languages

python
139335 projects - #7 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to sports.py

Soccergraphr
Soccer Analytics in R using OPTA data
Stars: ✭ 42 (-17.65%)
Mutual labels:  sports, soccer, football
ARGoal
Get more goals. | Virtual Goals & Goal Distance | App Doctor Hu
Stars: ✭ 14 (-72.55%)
Mutual labels:  sports, soccer, football
Awesome Soccer Analytics
⚽️📈 A curated list of awesome resources related to Soccer Analytics.
Stars: ✭ 244 (+378.43%)
Mutual labels:  sports, soccer, football
cfbscrapR
A scraping and aggregating package using the CollegeFootballData API
Stars: ✭ 25 (-50.98%)
Mutual labels:  sports, football, sports-stats
football analytics
⚽📊 A collection of football analytics projects, data, and analysis by Edd Webster (@eddwebster), including a curated list of publicly available resources published by the football analytics community.
Stars: ✭ 405 (+694.12%)
Mutual labels:  soccer, football, sports-stats
boxball
Prebuilt Docker images with Retrosheet's complete baseball history data for many analytical frameworks. Includes Postgres, cstore_fdw, MySQL, SQLite, Clickhouse, Drill, Parquet, and CSV.
Stars: ✭ 79 (+54.9%)
Mutual labels:  sports, baseball, sports-stats
mysportsfeeds-api
Feature requests for the MySportsFeeds Sports Data API.
Stars: ✭ 44 (-13.73%)
Mutual labels:  sports, hockey, sports-stats
flask-react-d3-celery
A full-stack dockerized web application to visualize Formula 1 race statistics from 2016 to present, with a Python Flask server and a React front-end with d3.js as data visualization tool.
Stars: ✭ 20 (-60.78%)
Mutual labels:  sports, sports-stats
sport-stats
Sport stats UI components
Stars: ✭ 62 (+21.57%)
Mutual labels:  sports, soccer
kickoff
Open Kick-Off is a fun rewriting attempt of the cult football game Kick Off 2 designed by Dino Dini and released in 1990 by Anco for the Atari ST and the Commodore Amiga. It is written in Java with the help of libGDX.
Stars: ✭ 32 (-37.25%)
Mutual labels:  soccer, football
nhl-twitter-bot
🚨 Hockey Game Bot is a Python application that sends important NHL events to social media platforms in (near) real time.
Stars: ✭ 18 (-64.71%)
Mutual labels:  sports, hockey
Engsoccerdata
English and European soccer results 1871-2020
Stars: ✭ 615 (+1105.88%)
Mutual labels:  sports, soccer
football-peek
[JavaScript - NodeJS] Application to access football scores
Stars: ✭ 14 (-72.55%)
Mutual labels:  soccer, football
retrosheet
Project to parse retrosheet baseball data in python
Stars: ✭ 19 (-62.75%)
Mutual labels:  sports, baseball
Deep-Neural-Networks-for-Baseball
A repository to follow along with Andrew Trask's "Grokking Deep Learning" by modelling baseball statistics using various architectures of neural networks built from scratch.
Stars: ✭ 15 (-70.59%)
Mutual labels:  sports, baseball
replay-table
A javascript library for visualizing sport season results with interactive standings
Stars: ✭ 67 (+31.37%)
Mutual labels:  sports, sports-stats
faq
DIY (Do-It-Yourself) - Yes, You Can! Design Your Own Punk (Pixel) Characters / Heads+Bodies using the Punk (Building) Blocks in the 24×24px (or 32×32px or 40×40px ) Formats And Much More
Stars: ✭ 15 (-70.59%)
Mutual labels:  basketball, football
Draw
⚽ Champions League draw simulator
Stars: ✭ 134 (+162.75%)
Mutual labels:  soccer, football
openrowingmonitor
A free and open source performance monitor for rowing machines
Stars: ✭ 29 (-43.14%)
Mutual labels:  sports, sports-stats
Pydfs Lineup Optimizer
Daily Fantasy Sports lineup optimzer for all popular daily fantasy sports sites
Stars: ✭ 245 (+380.39%)
Mutual labels:  sports, soccer

PyPI PyPI - Python Version

Build Status Coveralls github branch License

sports.py

Gather live up-to-date sports scores. Baseball, basketball, cricket, football, handball, hockey, rugby, soccer, tennis, and volleyball currently functional

Scrapes data from:

Installation

Python >= 3.5

pip install sports.py

Usage

import sports

Valid sports:

  • Baseball: sports.BASEBALL
  • Basketball: sports.BASKETBALL
  • Cricket: sports.CRICKET
  • Football: sports.FOOTBALL
  • Handball: sports.HANDBALL
  • Hockey: sports.HOCKEY
  • Rugby Union: sports.RUGBY_U
  • Rugby League: sports.RUGBY_L
  • Soccer: sports.SOCCER
  • Tennis: sports.TENNIS
  • Volleyball: sports.VOLLEYBALL

Get a single match

get_match() takes three parameters:

  • sport: Name of sport being played (see above for a list of valid sports)
  • team1: Name of city or team in a match (Not case-sensitive)
  • team2: Name of city or team in a match (Not case-sensitive)

get_match() returns a single Match object which contains the following properties:

  • sport: Sport of the match
  • league: League of the match
  • home_team: Home team
  • away_team: Away team
  • home_score: Home team score
  • away_score: Away team score
  • match_time: Current match time
  • match_date: Date the match was played
  • match_link: Link to an XML file containing match data
match = sports.get_match(sports.TENNIS, 'Murray', 'Federer')

Get multiple matches

get_sport() takes one parameter:

  • sport: Name of sport (see above for list of valid sports)

get_sport() returns a list of Match objects which contain the same properties described above

matches = sports.get_sport(sports.BASKETBALL)

Get all live matches

all_matches() returns a dictionary of Match objects grouped by sport conatining data from all live matches.

all_matches = sports.all_matches()
baseball = all_matches['baseball']

Get extra team info

Only works with MLB, NBA, NFL, and NHL teams

Get team information including overall record, championships won and more.

get_team() takes two parameters:

  • sport: Sport of the team the find
  • team: Name of city or team to find (Not case-sensitive)

Properties available to all valid teams/sports:

  • name: Name of the team
  • seasons: Total number of seasons played
  • record: Overall regular season record
  • champs: Number of total championships (Includes pre-merger champs for NFL)
  • leaders: Overall team leaders for certain statistical categories
  • raw: Dictionary containing all gathered info

Properties available to only MLB teams:

  • pennants: Total number of AL/NL championships

Properties available to only NFL teams:

  • super_bowls: Total number of Super Bowls

Properties available to only NHL teams:

  • points: Total number of regular season points earned

Properties available to both NFL/NHL teams:

  • playoff_record: Overall playoff record

Properties available to MLB, NBA, NHL teams:

  • playoff_app: Total number of playoff appearances
pirates = sports.get_team(sports.BASEBALL, 'pirates')
print(pirates.pennants)

penguins = sports.get_team(sports.HOCKEY, 'penguins')
print(penguins.points)

steelers = sports.get_team(sports.FOOTBALL, 'steelers')
print(steelers.super_bowls)

sixers = sports.get_team(sports.BASKETBALL, '76ers')
print(sixers.playoff_app)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].