BRScraper


NameBRScraper JSON
Version 1.0.1 PyPI version JSON
download
home_pagehttps://github.com/GabrielPastorello/BRScraper
SummaryPython module for Basketball Reference scraping and easy access to basketball data, including NBA, G League and international leagues
upload_time2023-08-27 20:15:17
maintainer
docs_urlNone
authorGabriel Speranza Pastorello
requires_python>=3.6
licenseMIT
keywords basketball reference scraper nba wnba gleague basketball international basketball
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center">
<img src="https://github.com/GabrielPastorello/BRScraper/assets/57769272/cb95ffa0-0806-4469-89bb-28ba6bc7ff00" width="150">
</p>
<p align="center">
    <a href="https://pypi.org/project/BRScraper/">
        <img src="https://img.shields.io/pypi/v/BRScraper" alt="pypi" />
    </a>
    <a href="https://pypi.org/project/BRScraper/">
        <img src="https://img.shields.io/pypi/pyversions/BRScraper" alt="python version" />
    </a>
    <a href="https://pypi.org/project/BRScraper/">
        <img src="https://img.shields.io/pypi/l/BRScraper" alt="license" />
    </a>
</p>

# BRScraper

Python package for easy access to basketball data through scraping of [Basketball Reference](https://www.basketball-reference.com/) website.

This allows users to obtain statistics, standings, and scores for various seasons and phases of the following tournaments:
- **NBA**
- **G League**
- **International Tournaments** (Olympics, EuroLeague, EuroCup and international leagues from: Spain, Australia, China, France, Greece, Israel, Italy, Turkey, Russia and ABA)

## Installing
### Via `pip`
This library was written as an exercise for creating my first PyPi package. Hopefully you will find it valuable!
Install with the following command:

```
pip install BRScraper
```

## Documentation
For documentation about the API methods refer to [the documentation](https://github.com/GabrielPastorello/BRScraper/blob/main/API.md).

## Example of use
```
from BRScraper import nba
```

```
# All players stats per game regular season
nba.get_stats(2023, info='per_game', playoffs=False, rename=False).head()
```
Output:
|     | Player           | Pos | Age | Tm  | G  | GS | ... | STL | BLK | TOV | PF  | PTS  | Season  |
| --- | ---------------- | --- | --- | --- | -- | -- | --- | --- | --- | --- | --- | ---- | ------- |
| 0   | Precious Achiuwa | C   | 23  | TOR | 55 | 12 | ... | 0.6 | 0.5 | 1.1 | 1.9 | 9.2  | 2022-23 |
| 1   | Steven Adams     | C   | 29  | MEM | 42 | 42 | ... | 0.9 | 1.1 | 1.9 | 2.3 | 8.6  | 2022-23 |
| 2   | Bam Adebayo      | C   | 25  | MIA | 75 | 75 | ... | 1.2 | 0.8 | 2.5 | 2.8 | 20.4 | 2022-23 |
| 3   | Ochai Agbaji     | SG  | 22  | UTA | 59 | 22 | ... | 0.3 | 0.3 | 0.7 | 1.7 | 7.9  | 2022-23 |
| 4   | Santi Aldama     | SF  | 22  | MEM | 77 | 20 | ... | 0.6 | 0.6 | 0.8 | 1.9 | 9.0  | 2022-23 |

More examples in the files.

Use it wisely!

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/GabrielPastorello/BRScraper",
    "name": "BRScraper",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "basketball reference,scraper,nba,wnba,gleague,basketball,international basketball",
    "author": "Gabriel Speranza Pastorello",
    "author_email": "gabriel.pastorello01@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/07/a3/2eb347455da7b6f648a57c29a824ff399b178102a674c07379df07e69792/BRScraper-1.0.1.tar.gz",
    "platform": null,
    "description": "<p align=\"center\">\r\n<img src=\"https://github.com/GabrielPastorello/BRScraper/assets/57769272/cb95ffa0-0806-4469-89bb-28ba6bc7ff00\" width=\"150\">\r\n</p>\r\n<p align=\"center\">\r\n    <a href=\"https://pypi.org/project/BRScraper/\">\r\n        <img src=\"https://img.shields.io/pypi/v/BRScraper\" alt=\"pypi\" />\r\n    </a>\r\n    <a href=\"https://pypi.org/project/BRScraper/\">\r\n        <img src=\"https://img.shields.io/pypi/pyversions/BRScraper\" alt=\"python version\" />\r\n    </a>\r\n    <a href=\"https://pypi.org/project/BRScraper/\">\r\n        <img src=\"https://img.shields.io/pypi/l/BRScraper\" alt=\"license\" />\r\n    </a>\r\n</p>\r\n\r\n# BRScraper\r\n\r\nPython package for easy access to basketball data through scraping of [Basketball Reference](https://www.basketball-reference.com/) website.\r\n\r\nThis allows users to obtain statistics, standings, and scores for various seasons and phases of the following tournaments:\r\n- **NBA**\r\n- **G League**\r\n- **International Tournaments** (Olympics, EuroLeague, EuroCup and international leagues from: Spain, Australia, China, France, Greece, Israel, Italy, Turkey, Russia and ABA)\r\n\r\n## Installing\r\n### Via `pip`\r\nThis library was written as an exercise for creating my first PyPi package. Hopefully you will find it valuable!\r\nInstall with the following command:\r\n\r\n```\r\npip install BRScraper\r\n```\r\n\r\n## Documentation\r\nFor documentation about the API methods refer to [the documentation](https://github.com/GabrielPastorello/BRScraper/blob/main/API.md).\r\n\r\n## Example of use\r\n```\r\nfrom BRScraper import nba\r\n```\r\n\r\n```\r\n# All players stats per game regular season\r\nnba.get_stats(2023, info='per_game', playoffs=False, rename=False).head()\r\n```\r\nOutput:\r\n|     | Player           | Pos | Age | Tm  | G  | GS | ... | STL | BLK | TOV | PF  | PTS  | Season  |\r\n| --- | ---------------- | --- | --- | --- | -- | -- | --- | --- | --- | --- | --- | ---- | ------- |\r\n| 0   | Precious Achiuwa | C   | 23  | TOR | 55 | 12 | ... | 0.6 | 0.5 | 1.1 | 1.9 | 9.2  | 2022-23 |\r\n| 1   | Steven Adams     | C   | 29  | MEM | 42 | 42 | ... | 0.9 | 1.1 | 1.9 | 2.3 | 8.6  | 2022-23 |\r\n| 2   | Bam Adebayo      | C   | 25  | MIA | 75 | 75 | ... | 1.2 | 0.8 | 2.5 | 2.8 | 20.4 | 2022-23 |\r\n| 3   | Ochai Agbaji     | SG  | 22  | UTA | 59 | 22 | ... | 0.3 | 0.3 | 0.7 | 1.7 | 7.9  | 2022-23 |\r\n| 4   | Santi Aldama     | SF  | 22  | MEM | 77 | 20 | ... | 0.6 | 0.6 | 0.8 | 1.9 | 9.0  | 2022-23 |\r\n\r\nMore examples in the files.\r\n\r\nUse it wisely!\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python module for Basketball Reference scraping and easy access to basketball data, including NBA, G League and international leagues",
    "version": "1.0.1",
    "project_urls": {
        "Homepage": "https://github.com/GabrielPastorello/BRScraper"
    },
    "split_keywords": [
        "basketball reference",
        "scraper",
        "nba",
        "wnba",
        "gleague",
        "basketball",
        "international basketball"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "aa7e494eb0941084109a03cd531ec89d9661daa2323107ebafe66eb29bee51b4",
                "md5": "6c7db21678b953cf45802d92747ebc68",
                "sha256": "bbdd2133b82aa878649419e28c065b2caf7b416861adcfe2dc1f30d23f9a22e8"
            },
            "downloads": -1,
            "filename": "BRScraper-1.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6c7db21678b953cf45802d92747ebc68",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 19493,
            "upload_time": "2023-08-27T20:15:15",
            "upload_time_iso_8601": "2023-08-27T20:15:15.384577Z",
            "url": "https://files.pythonhosted.org/packages/aa/7e/494eb0941084109a03cd531ec89d9661daa2323107ebafe66eb29bee51b4/BRScraper-1.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "07a32eb347455da7b6f648a57c29a824ff399b178102a674c07379df07e69792",
                "md5": "a5a0bf1a5c8e239f48ebfcb2d980842b",
                "sha256": "d6e588e22609423251560a635ebd30c0de0678550bdf64db2a735aef5d3e2e72"
            },
            "downloads": -1,
            "filename": "BRScraper-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "a5a0bf1a5c8e239f48ebfcb2d980842b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 8947,
            "upload_time": "2023-08-27T20:15:17",
            "upload_time_iso_8601": "2023-08-27T20:15:17.119327Z",
            "url": "https://files.pythonhosted.org/packages/07/a3/2eb347455da7b6f648a57c29a824ff399b178102a674c07379df07e69792/BRScraper-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-27 20:15:17",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "GabrielPastorello",
    "github_project": "BRScraper",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "brscraper"
}
        
Elapsed time: 0.14730s