sportmonks-py


Namesportmonks-py JSON
Version 0.0.7 PyPI version JSON
download
home_pageNone
SummaryA Python package to interact with the SportMonks API
upload_time2024-12-17 18:58:51
maintainerNone
docs_urlNone
authorChris McCallan
requires_python>=3.9
licenseMIT License Copyright (c) 2024 cmccallan Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords api apiv3 data football soccer sportmonks
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # sportmonks-py
Python Package for SportsMonks API

Full details on the SportMonks API can be found [here](https://docs.sportmonks.com/football/) 

### 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](https://docs.sportmonks.com/football/api/rate-limit).

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](https://sportmonks-py.readthedocs.io/en/stable/)

### Installation

```bash
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:
```python
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. 
```python
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.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "sportmonks-py",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "Chris McCallan <chris.mccallan+sportmonks@hotmail.co.uk>",
    "keywords": "api, apiv3, data, football, soccer, sportmonks",
    "author": "Chris McCallan",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/19/28/9ec70ece57393480f5b63270b08cbab86873688e94a29679bf0ae73ccc93/sportmonks_py-0.0.7.tar.gz",
    "platform": null,
    "description": "# sportmonks-py\nPython Package for SportsMonks API\n\nFull details on the SportMonks API can be found [here](https://docs.sportmonks.com/football/) \n\n### Football\n\nV3 of the SportMonks API is split into defined `Entities`, as listed below\n\n- Fixture\n- League, Season, Schedule, Stage and Round\n- Team, Player, Squad, Coach and Referee\n- Statistic\n- Expected\n- Standing and Topscorer\n- Odd and Prediction\n- Other\n\nSportMonks imposes rate limits per entity (3000 per hour), hence this package separates endpoints by entity. More information\non entity rate limits can be viewed in the SportMonks documentation [here](https://docs.sportmonks.com/football/api/rate-limit).\n\nFor brevity and ease of use, entities have been mapped to a shortened keyword as below\n\n| Entity Name | API Endpoint |\n| ------------|--------------|\n| Fixture     | fixture      |\n |League, Season, Schedule, Stage and Round | leagues      |\n | Team, Player, Squad, Coach and Referee | teams        |\n| Statistic | statistics   |\n| Expected | expected     |\n| Standing and Topscorer | standings    |\n| Odd and Prediction | odds         |\n| Other | misc         |\n\n### Documentation\nFull documentation can be found at [ReadTheDocs](https://sportmonks-py.readthedocs.io/en/stable/)\n\n### Installation\n\n```bash\npip install sportmonks-py\n```\n\n\n#### Examples\n\nSee the `examples` directory for more examples on how to use the package.\n\n### Returns\nGiven 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:\n```python\nStdResponse = Iterable[Iterator[dict[str, Any]]]\n```\nA 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. \n```python\nAsyncResponse = AsyncIterator[Iterator[dict[str, Any]]]\n```\nAn 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.\n\nSee the examples below for more information on how to use the response objects.\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2024 cmccallan  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "A Python package to interact with the SportMonks API",
    "version": "0.0.7",
    "project_urls": {
        "Changelog": "https://github.com/christophermccallan/sportmonks-py/blob/main/Changelog",
        "Issues": "https://github.com/christophermccallan/sportmonks-py/issues",
        "Repository": "https://github.com/christophermccallan/sportmonks-py"
    },
    "split_keywords": [
        "api",
        " apiv3",
        " data",
        " football",
        " soccer",
        " sportmonks"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4742b2ad5fb328925feb8590d4469296bcd243342547e930017f5e17f637fe40",
                "md5": "3b5301b1decb9015bedbacb960f0fd50",
                "sha256": "cb380586756bd72a87277b3b9d3ce754b42ce6c3f466cf14365cc97a606bdeea"
            },
            "downloads": -1,
            "filename": "sportmonks_py-0.0.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3b5301b1decb9015bedbacb960f0fd50",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 20387,
            "upload_time": "2024-12-17T18:58:48",
            "upload_time_iso_8601": "2024-12-17T18:58:48.478470Z",
            "url": "https://files.pythonhosted.org/packages/47/42/b2ad5fb328925feb8590d4469296bcd243342547e930017f5e17f637fe40/sportmonks_py-0.0.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "19289ec70ece57393480f5b63270b08cbab86873688e94a29679bf0ae73ccc93",
                "md5": "31853357d4ff2875e14dbe5cf7f29cdb",
                "sha256": "5c4defda34b66558ac7ec343f4d2cb254cab10c31cc2f0dc28b77edb6d3b12a3"
            },
            "downloads": -1,
            "filename": "sportmonks_py-0.0.7.tar.gz",
            "has_sig": false,
            "md5_digest": "31853357d4ff2875e14dbe5cf7f29cdb",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 94763,
            "upload_time": "2024-12-17T18:58:51",
            "upload_time_iso_8601": "2024-12-17T18:58:51.446452Z",
            "url": "https://files.pythonhosted.org/packages/19/28/9ec70ece57393480f5b63270b08cbab86873688e94a29679bf0ae73ccc93/sportmonks_py-0.0.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-17 18:58:51",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "christophermccallan",
    "github_project": "sportmonks-py",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "sportmonks-py"
}
        
Elapsed time: 0.79377s