Python wrapper for the Sportradar APIs โšฝ๏ธ๐Ÿˆ

Overview

Sportradar APIs


Build Status PyPI version Python version

This is a Python wrapper for the sports APIs provided by Sportradar. You'll need to sign up for an API key to use the service. Sportradar provides a free trial evaluation that provides 1,000 API queries at up to 1 query per second.

Supported APIs

Sport API Wrapper Unit Tests
Soccer โšฝ โœ”๏ธ โœ”๏ธ
NBA ๐Ÿ€ โœ”๏ธ โœ”๏ธ
WNBA ๐Ÿ€ โœ”๏ธ โœ”๏ธ
NCAAMB ๐Ÿ€ โœ”๏ธ โœ”๏ธ
NFL ๐Ÿˆ โœ”๏ธ โœ”๏ธ
NHL ๐Ÿ† โœ”๏ธ โœ”๏ธ
Tennis ๐ŸŽพ โœ”๏ธ โœ”๏ธ
MLB โšพ โœ”๏ธ โœ”๏ธ
Darts ๐ŸŽฏ โœ”๏ธ โœ”๏ธ
Beach volleyball ๐ŸŒด โœ”๏ธ โœ”๏ธ
Golf โ›ณ โœ”๏ธ โœ”๏ธ
NASCAR ๐Ÿš— โœ”๏ธ โœ”๏ธ
LoL ๐ŸŽฎ โœ”๏ธ โœ”๏ธ
Dota2 ๐ŸŽฎ โœ”๏ธ โœ”๏ธ
Cricket ๐Ÿฆ— โœ”๏ธ โœ”๏ธ
Rugby ๐Ÿ‰ โœ”๏ธ โœ”๏ธ

Installation

The easiest way to start using this package is via PyPI using pip:

$pip install sportradar

If you'd prefer to clone the repository and install the package manually, follow these steps:

  1. Clone this repo: $git clone https://github.com/johnwmillr/SportradarAPIs.git
  2. Enter the cloned directory: $cd SportradarAPIs
  3. Install: $python setup.py install

Usage

Below is a brief demonstration of how to use the package to download data for the 2018 FIFA World Cup.

from sportradar import Soccer

# Create an instance of the Sportradar Soccer API class
sr = Soccer.Soccer("paste your api key here")

# Get a list of all tournaments
tournaments = sr.get_tournaments().json()

# Get info on the 2018 World Cup (Teams, Rounds, etc.)
worldcup = sr.get_tournament_info(tournaments['tournaments'][4]['id']).json()

# Get more information on each team in the World Cup
teams = []
team_counter = 0
for group in worldcup['groups']:
    for team in group['teams']:
        team_counter += 1
        team_id = team['id']
        team_name = team['name']
        print("({}): {}, {}".format(team_counter, team_name, team_id))
        try:
            teams.append(sr.get_team_profile(team_id).json())
        except Exception as e:
            print("Error: {}".format(e))
        time.sleep(5) # wait 5 seconds before next API call

# Save the team data to a .json file
print("Saving the data...", end="", flush=True)
with open("world_cup_team_data.json", "w") as outfile:
    json.dump(teams, outfile)
print(" Done.")

Example projects

Owner
John W. Miller
I, for one, welcome our new computer overlords.
John W. Miller
Sakamata-alpha-pycord - Sakamata bot alpha with pycord

sakamatabot ใ“ใฎใƒชใƒใ‚ธใƒˆใƒชใฏ๏ผŸ ใƒ›ใƒญใƒฉใ‚คใƒ–ๆ‰€ๅฑžVTuberๆฒ™่Šฑๅ‰ใ‚ฏใƒญใƒฑใ•ใ‚“ใฎ้žๅ…ฌๅผใƒ•ใ‚กใƒณDiscordใ‚ตใƒผใƒใƒผใ€Œใ‚ฏใƒญใƒฑๆฐดๆ—้คจใ€ใฎ้‹ๅ–ถ/็ฎก็†่ฃœๅŠฉใ‚’่กŒใ†

sushichaaaan 1 May 04, 2022
Python wrapper for Coinex APIs

coinexpy - Python wrapper for Coinex APIs Through coinexpy you can simply buy or sell crypto in your Coinex account Features place limit order place m

Iman Mousaei 16 Jan 02, 2023
Select random winners for a Twitter giveaway

twitter_picker Select random winners for a Twitter giveaway Once the Twitter giveaway (or airdrop) is closed, assign a number to each participant. The

Michael Rawner 1 Dec 11, 2021
้˜ฟ้‡Œไบ‘็›˜ไธŠไผ ่„šๆœฌ

้˜ฟ้‡Œไบ‘็›˜ไธŠไผ ่„šๆœฌ Author๏ผšๆŽๅฐๆฉ Github๏ผšhttps://github.com/Hidove/aliyundrive-uploader ๅฆ‚ๆœ‰ไพตๆƒ๏ผŒ่ฏท่”็ณปๆˆ‘ๅˆ ้™ค ็ฆๆญข็”จไบŽ้žๆณ•็”จ้€”๏ผŒ่ฟ่€…ๅŽๆžœ่‡ช่ดŸ ็Žฏๅขƒ่ฆๆฑ‚ python3 ไฝฟ็”จๆ–นๆณ• ๅฎ‰่ฃ… git clone https://github.co

Hidove 301 Jan 01, 2023
A simple telegram bot to save restricted content with custom thumbmail support by Mahesh Chauhan

Save Restricted Content Bot A simple telegram bot to save restricted content with custom thumbmail support by Mahesh Chauhan. Variables API_ID API_HAS

Mahesh Chauhan 532 Jan 02, 2023
A Discord bot to easily and quickly format your JSON data

Invite PrettyJSON to your Discord server Table of contents About the project What is JSON? What is pretty printing? How to use Input options Command I

Sem 4 Jan 24, 2022
An advanced crypto trading bot written in Python

Jesse Jesse is an advanced crypto trading framework which aims to simplify researching and defining trading strategies. Why Jesse? In short, Jesse is

Jesse 4.4k Jan 09, 2023
A Telegram Bot with(Forwarder Bot + User Bot + More Features )

A Telegram Bot with(Forwarder Bot + User Bot + More Features )

Kaif 3 Feb 16, 2022
KTUN ร–ฤŸrenci Bilgi Sistemine baฤŸlanฤฑp her 15 dakikada notlarฤฑ kontrol eden ve deฤŸiลŸiklik olduฤŸu zaman size Discord Webhook ile mesaj atan uygulama.

KTUN_Obis KTUN ร–ฤŸrenci Bilgi Sistemi KTUN ร–ฤŸrenci Bilgi Sistemine selenium kullanarak girip setttings.py dosyasฤฑnda verdiฤŸiniz bilgeri doldurup ardฤฑnd

ฤฐbrahim Uysal 5 Oct 27, 2022
Tracker to check the covid shot slot availability in India and send mobile alerts via Twilio Messaging Service.

Cowin-Slot-Tracker Tracker to check the covid vaccine slot availability in India and send mobile notifications through Twilio Messaging Service. Requi

invalid username 27 Nov 12, 2022
Telegram music & video bot direct play music

โšก NOINOI MUSIC PLAYER ๐ŸŽต SUPERFAST MUSIC BOT WHO CAN DIRECT PLAY SONG ON TELEGRAM VOICE CHAT ALSO CAN PLAY VIDEO ON VOICE CHATS โœจ Heroku Deploy YOU CA

noinoi-X 1 Dec 28, 2021
A Anything goes Discord bot written in python and uses the wrapper Discord.py

GerardTheWizard A Anything goes Discord bot written in python and uses the wrapper Discord.py What can he do? Allow users to level up through typing,

1 May 05, 2022
Sync mastodon toot and Telegram channel or group in both direction.

Sync mastodon toot and telegram channel or group in both direction.

Littlebear0729 7 Dec 18, 2022
This Telegram bot allows you to create direct links with pre-filled text to WhatsApp Chats

WhatsApp API Bot Telegram bot to create direct links with pre-filled text for WhatsApp Chats You can check our bot here. The bot is based on the API p

RobotTrick โ€ข ืจื•ื‘ื•ื˜ืจื™ืง 17 Aug 20, 2022
Acid's Utilities is a bot for my Discord server that alerts when I go live, welcomes new users, has some awesome games and so much more!

Acid's Utilities Acid's Utilities is a bot for my Discord server that alerts when I go live, welcomes new users, has some awesome games and so much mo

AcidFilms (Fin Stuart) 3 Nov 19, 2021
๐Ÿค– Fast and simple bot to transform links from Amazon into a nice post with your referral link in Telegram ๐Ÿ›’

AmazonBot ๐Ÿค– Fast and simple bot to transform links from Amazon into a nice post with your referral link in Telegram ๐Ÿ›’ Prerequisites You need Python

Alternative Profit 3 Dec 25, 2022
GTPS Status Bot

Python GTPS Status Bot (BETA) Python GTPS Status Bot Require Python How To Use Download This Source Extract The Zip File Install the requirements (Mod

Lamp 4 Oct 11, 2021
A wrapper for slurm especially on Taiwania2 (HPC CLI)A wrapper for slurm especially on Taiwania2 (HPC CLI)

TWCC-slurm-wrapper A wrapper for slurm especially on Taiwania2 (HPC CLI). For Taiwania2 (HPC CLI) usage, please refer to here. (ไธญๆ–‡) How to Install? gi

Chi-Liang, Liu 5 Oct 07, 2022
inventory replenishment for a hospital.

Inventory-Replenishment Inventory-Replenishment for a hospital that would like to explore how advanced anlytics may help automate their decision proce

1 Jan 09, 2022