A Python package to interact with the SportMonks API
Project description
sportmonks-py
Python Package for SportsMonks API
Full details on the SportMonks API can be found here
Football
V3 of the SportMonks API is split into defined Entities, as listed below
- Fixture
- League, Season, Schedule, Stage and Round
- Team, Player, Squad, Coach and Referee
- Statistic
- Expected
- Standing and Topscorer
- Odd and Prediction
- Other
SportMonks imposes rate limits per entity (3000 per hour), hence this package separates endpoints by entity. More information on entity rate limits can be viewed in the SportMonks documentation here.
For brevity and ease of use, entities have been mapped to a shortened keyword as below
| Entity Name | API Endpoint |
|---|---|
| Fixture | fixture |
| League, Season, Schedule, Stage and Round | leagues |
| Team, Player, Squad, Coach and Referee | teams |
| Statistic | statistics |
| Expected | expected |
| Standing and Topscorer | standings |
| Odd and Prediction | odds |
| Other | misc |
Documentation
Full documentation can be found at ReadTheDocs
Installation
pip install sportmonks-py
Examples
See the examples directory for more examples on how to use the package.
Returns
Given the size of the potential responses all calls return a generator object. This allows for the handling of large responses without the need to load the entire response into memory. The generator object can be iterated over to get the full response. The generators are defined depending on whether the call was asynchronous or not:
StdResponse = Iterable[Iterator[dict[str, Any]]]
A standard (non-async) response is an iterable of iterators of dictionaries. The dictionaries contain the response data. The response data is paginated, so the iterators are used to iterate over the pages of data.
AsyncResponse = AsyncIterator[Iterator[dict[str, Any]]]
An async response is an async iterable of dictionaries. The dictionaries contain the response data. The response data is paginated, so the async iterable is used to iterate over the pages of data.
See the examples below for more information on how to use the response objects.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sportmonks_py-0.0.8.tar.gz.
File metadata
- Download URL: sportmonks_py-0.0.8.tar.gz
- Upload date:
- Size: 94.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1daf1e037337fa10931a75d7adf950e4aaa277f16fff7a83ec4d4d11e0c80d70
|
|
| MD5 |
a3253dfc066dced8d99e52202bead64b
|
|
| BLAKE2b-256 |
2e8a40ebfc71e62dc976cb53dcc56fa5ff35c8a0bb8fc1118bc672f6af49347f
|
File details
Details for the file sportmonks_py-0.0.8-py3-none-any.whl.
File metadata
- Download URL: sportmonks_py-0.0.8-py3-none-any.whl
- Upload date:
- Size: 20.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e34238f1dade0b729314065c022f6cf935636d70254ca388a7fb27af8d114c24
|
|
| MD5 |
dd0930a6e632bd1ea06f92d2d859df56
|
|
| BLAKE2b-256 |
7760bea5d55d0f7536cb177983dc4652093783f054876717808e595b4c246221
|