Skip to content

A python executable that allows the user to search statistics relating to NBA teams and players.

License

Notifications You must be signed in to change notification settings

JDSanti/NBA-Statistics

Repository files navigation

NBA-Statistics

This python project is an executable that allows the user to search NBA team and player statistics at a given time Learn more.


If you want to learn more about setup.py files, check out this repository.

nba_api is an API Client for www.nba.com. This package is meant to make the API Endpoints more accessible and to provide extensive documentation.

The APIs on www.nba.com are largely undocumented and change frequently.

Please feel free to contribute and have an open discussion regarding improvements and additional APIs to be mapped.

#### Mapped API Clients

  1. stats.nba.com - stats

# Have Questions or Need Help?

Please try to avoid sending questions to my personal email that regard researching a solution to your specific problem. I don't mind helping, but the library has been setup with expansive documentation that should be checked first prior to reaching out to me personally. Alternatively, there are other places where you can ask for general advice that has been listed below.

## Slack Channel There has been a public slack channel that has been setup for people to chat and receive help. - https://join.slack.com/t/nbaapi/shared_invite/enQtOTY0MjIwMTI2ODIwLWIzZGFmMjQ4MDk4MTVmMTA2NWEwYmQzZDRiYTM3NDI4OWY5NGJiY2Q1M2EwZGUzOTQ1MTk4MDEyZGI1NGM2ZDI

## Stack Overflow A tag has been set up for people to use when asking for help on Stack Overflow. Please tag posts with the nba-api tag. - https://stackoverflow.com/questions/tagged/nba-api

# Use

## Installation `commandline pip install nba_api ` Required and Optional Packages: - [requests](https://requests.readthedocs.io/en/master/) - [pandas](https://pandas.pydata.org/) (optional)

## Usage Examples - [Basic Usage](https://github.com/swar/nba_api/blob/master/docs/nba_api/stats/examples.md) -- The basics of calling an API endpoint. - [Jupyter Notebooks](https://github.com/swar/nba_api/tree/master/docs/examples) -- Larger practical examples in Jupyter Notebook format, including looking for play-by-play data for a particular game.

## Documentation

## Contributing and Development ### Development To get started developing, clone the repo and cd into it. Then, in an environment (conda or virtualenv) where you have not yet installed nba_api, run `bash python -m pip install -e . ` This command will install the package for development, such that any changes you make in the repo will be reflected the next time you import the package in Python.

### Testing If you make a change to the package, it's important to verify everything still works. Do so by first installing the package for development, with the -e flag (see Development above), and then running `bash pytest ` on the command line from the base directory of the repo. The pytest utility will run through all the package tests and print output throughout, informing you of any failures.

### Contributing We're always looking for people to help! Some examples of ways to get involved are: - fix a bug - add a feature - create or improve documentation and examples

Just fork this repo, make your changes (see [Development](#Development) above), and issue a pull request.

# Other

## Endpoint Analysis A major purpose of this package is to map and analyze as many endpoints on NBA.com as possible. The documentation and analysis on the Endpoints and Parameters found in this package is some of the most extensive information available on these largely undocumented Endpoints. Please open an issue with any additional Endpoints/APIs.

## Examples for Other Clients

[Endpoint Analysis JSON _for use with other clients_](https://github.com/swar/nba_api/tree/master/analysis_archive/stats)

About

A python executable that allows the user to search statistics relating to NBA teams and players.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published