# pybaseballstats
A Python package for scraping baseball statistics from the web. Inspired by the pybaseball package by James LeDoux.
## Available Sources
1. [Baseball Savant](https://baseballsavant.mlb.com/)
- This source provides high quality pitch-by-pitch data for all MLB games since 2015.
2. [Fangraphs](https://www.fangraphs.com/)
- This source provides pitching, batting and fielding statistics for all MLB players since 1871.
## Installation
pybaseballstats can be installed using pip or any other package manager (I use [uv](https://docs.astral.sh/uv/)).
Examples:
```bash
pip install pybaseballstats
```
or:
```bash
uv add pybaseballstats
```
## Documentation
Usage documentation can be found at /usage_docs/
Technical documentation can be found at /technical_docs/
## Contributing
Improvements and bug fixes are welcome! Please open an issue or submit a pull request. If you are opening an issue please keep in mind that I am enrolled in university full-time and may not be able to respond immediately. I work on this in my free time, but I will do my best to fix any issues that are opened. To submit a pull request, please fork the repository and make your changes on a new branch. Make your changes and please create new tests if you are adding new functionality (updates to my own tests are more than welcome as well). Make sure all tests pass and once you are finished, submit a pull request and I will review your changes. Please include a detailed description of the changes you made and why you made them as a part of your pull request.
## Credit and Acknowledgement
This project was heavily inspired by the pybaseball package by James LeDoux. The goal of this project is to provide a similar set of functionality with continual updates and improvements, as the original pybaseball package has lagged behind with updates and key functionality has been broken (hence my decision to create this new package).
All of the data scraped by this package is publicly available and free to use. The data is sourced from Baseball Savant and Fangraphs, and all credit for the data goes to those organizations.
Raw data
{
"_id": null,
"home_page": null,
"name": "pybaseballstats",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.13",
"maintainer_email": "Nicolas Carbone <carbone.nicolas0@gmail.com>",
"keywords": "Baseball Savant, Fangraphs, MLB, baseball, data, sabermetrics, savant, scraping, stats",
"author": null,
"author_email": "Nicolas Carbone <carbone.nicolas0@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/41/dd/2ff67f5ea95bada8153b55dd1314bc3b64a829d540f6a98d5d4231e62b2c/pybaseballstats-0.0.10.tar.gz",
"platform": null,
"description": "# pybaseballstats\n\nA Python package for scraping baseball statistics from the web. Inspired by the pybaseball package by James LeDoux.\n\n## Available Sources\n\n1. [Baseball Savant](https://baseballsavant.mlb.com/)\n - This source provides high quality pitch-by-pitch data for all MLB games since 2015.\n2. [Fangraphs](https://www.fangraphs.com/)\n - This source provides pitching, batting and fielding statistics for all MLB players since 1871.\n\n## Installation\n\npybaseballstats can be installed using pip or any other package manager (I use [uv](https://docs.astral.sh/uv/)).\n\nExamples:\n\n```bash\npip install pybaseballstats\n```\n\nor:\n\n```bash\nuv add pybaseballstats\n```\n\n## Documentation\n\nUsage documentation can be found at /usage_docs/\nTechnical documentation can be found at /technical_docs/\n\n## Contributing\n\nImprovements and bug fixes are welcome! Please open an issue or submit a pull request. If you are opening an issue please keep in mind that I am enrolled in university full-time and may not be able to respond immediately. I work on this in my free time, but I will do my best to fix any issues that are opened. To submit a pull request, please fork the repository and make your changes on a new branch. Make your changes and please create new tests if you are adding new functionality (updates to my own tests are more than welcome as well). Make sure all tests pass and once you are finished, submit a pull request and I will review your changes. Please include a detailed description of the changes you made and why you made them as a part of your pull request.\n\n## Credit and Acknowledgement\n\nThis project was heavily inspired by the pybaseball package by James LeDoux. The goal of this project is to provide a similar set of functionality with continual updates and improvements, as the original pybaseball package has lagged behind with updates and key functionality has been broken (hence my decision to create this new package).\n\nAll of the data scraped by this package is publicly available and free to use. The data is sourced from Baseball Savant and Fangraphs, and all credit for the data goes to those organizations.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A Python package for scraping baseball data.",
"version": "0.0.10",
"project_urls": {
"Repository": "https://github.com/nico671/pybaseballstats"
},
"split_keywords": [
"baseball savant",
" fangraphs",
" mlb",
" baseball",
" data",
" sabermetrics",
" savant",
" scraping",
" stats"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "716cf82735bbfa8e41f7bf57f87a2ad604eba8afbc3adc268a7ccc0150ae889b",
"md5": "0b7d986858091328c0704427dbd1772b",
"sha256": "22ab13d713416a65c0d821fdb52f2a95c00d0e0c4b9cefa4b2fd3e78db3c3af3"
},
"downloads": -1,
"filename": "pybaseballstats-0.0.10-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0b7d986858091328c0704427dbd1772b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.13",
"size": 11274,
"upload_time": "2025-01-24T15:42:18",
"upload_time_iso_8601": "2025-01-24T15:42:18.434417Z",
"url": "https://files.pythonhosted.org/packages/71/6c/f82735bbfa8e41f7bf57f87a2ad604eba8afbc3adc268a7ccc0150ae889b/pybaseballstats-0.0.10-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "41dd2ff67f5ea95bada8153b55dd1314bc3b64a829d540f6a98d5d4231e62b2c",
"md5": "4e803c54db47d84b8cd1b5edfae15f52",
"sha256": "76c91983d18bd1c231e4d4d613b4d22e9978031ce94dbadcdc4c90837dde2f11"
},
"downloads": -1,
"filename": "pybaseballstats-0.0.10.tar.gz",
"has_sig": false,
"md5_digest": "4e803c54db47d84b8cd1b5edfae15f52",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.13",
"size": 30333,
"upload_time": "2025-01-24T15:42:20",
"upload_time_iso_8601": "2025-01-24T15:42:20.727485Z",
"url": "https://files.pythonhosted.org/packages/41/dd/2ff67f5ea95bada8153b55dd1314bc3b64a829d540f6a98d5d4231e62b2c/pybaseballstats-0.0.10.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-24 15:42:20",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "nico671",
"github_project": "pybaseballstats",
"github_not_found": true,
"lcname": "pybaseballstats"
}