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.
Release files for mls-api 2.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mls-api-2.0.3.tar.gz | 16.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mls_api-2.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 34.0 kB
Release files / mls-api-2.0.3.tar.gz
| Download URL | mls-api-2.0.3.tar.gz |
|---|---|
| Size | 16.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0b0745629d9d1d18a197e4afa5fc038643d76b62b1c7e730d85bac5ade386fb2
|
|
BLAKE2b-256 checksum How to use checksums |
37fddfb71fac9c15dad03457cd5146035fcec888ddfbbf85dc73a5928562135e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.11
|
Release files / mls_api-2.0.3-py3-none-any.whl
| Download URL | mls_api-2.0.3-py3-none-any.whl |
|---|---|
| Size | 18.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f7d411af051d5c558a8878aa9ccb538e63ab2adfa89ccd2a89476670397c38c3
|
|
BLAKE2b-256 checksum How to use checksums |
75ccb4c9a1f487b65b1f1c0ce1b22c53971c47f2c3db58f3123c16b9e57b2acd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.11
|