Python library for integrating with the MLS (Major League Soccer) API.
Project description
Python library for integrating with MLS API functionality.
Requirements
Python 2.7 and later.
Setup
You can install this package by using the pip tool and installing:
$ pip install mls-api
Or:
$ easy_install mls-api
Usage Example
import mls_api
from dotenv import load_dotenv
import os
## Loads environment variables from .env
load_dotenv('.env')
username = os.getenv('_USERNAME')
password = os.getenv('_PASSWORD')
## Authentication
mls_api.login(username, password)
## Retrieve MLS Real-Time Data
mls_rtd = mls_api.get_rtd()
print(mls_rtd)
## Retrieve MLS Historical Data
mls_historical = mls_api.get_historical_data()
print(mls_historical)
## Retrieve MLS Players Data
mls_players = mls_api.get_players()
print(mls_players)
## Retrieve MLS Assist Data
mls_assists = mls_api.get_assists()
print(mls_assists)
## Retrieve MLS Offence Data
mls_offence = mls_api.get_offence()
print(mls_offence)
## Retrieve MLS Top Scorers Data
mls_top_scorer = mls_api.get_top_scorer()
print(mls_top_scorer)
## Retrieve MLS Teams Data
mls_teams = mls_api.get_teams()
print(mls_teams)
## Retrieve MLS Fixtures Data
mls_fixtures = mls_api.get_fixtures()
print(mls_fixtures)
## Retrieve MLS Standings Data
mls_standings = mls_api.get_standings()
print(mls_standings)
## Retrieve MLS Latest News Data
mls_latest_news = mls_api.get_latest_news()
print(mls_latest_news)
Setting up an MLS API Account
Sign up for a self-service user account.
Using the MLS API
You can read the API documentation to understand what’s possible with the MLS API. If you need further assistance, don’t hesitate to contact us.
License
This project is licensed under the MIT License.
Copyright
Copyright © 2022 Moat Systems Limited. All Rights Reserved.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mls-api-1.0.3.tar.gz
(15.1 kB
view hashes)
Built Distribution
mls_api-1.0.3-py3-none-any.whl
(18.1 kB
view hashes)