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
limit = 5
offset = 5
mls_players_l = mls_api.get_players(limit=limit)
print(mls_players_l)
mls_players = mls_api.get_players(limit=limit, offset=offset)
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 © 2020 - 2024 Hori 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-2.0.3.tar.gz
(16.0 kB
view details)
Built Distribution
mls_api-2.0.3-py3-none-any.whl
(18.0 kB
view details)
File details
Details for the file mls-api-2.0.3.tar.gz
.
File metadata
- Download URL: mls-api-2.0.3.tar.gz
- Upload date:
- Size: 16.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b0745629d9d1d18a197e4afa5fc038643d76b62b1c7e730d85bac5ade386fb2 |
|
MD5 | 38c1398e533970c164497bca802a53e2 |
|
BLAKE2b-256 | 37fddfb71fac9c15dad03457cd5146035fcec888ddfbbf85dc73a5928562135e |
File details
Details for the file mls_api-2.0.3-py3-none-any.whl
.
File metadata
- Download URL: mls_api-2.0.3-py3-none-any.whl
- Upload date:
- Size: 18.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7d411af051d5c558a8878aa9ccb538e63ab2adfa89ccd2a89476670397c38c3 |
|
MD5 | a5431f57afa7ab6bcc5d7b035400b127 |
|
BLAKE2b-256 | 75ccb4c9a1f487b65b1f1c0ce1b22c53971c47f2c3db58f3123c16b9e57b2acd |