A Python API for retrieving NBA data. This API provides access to player information, team details, game statistics, league standings, and more.
This project offers a convenient way to access a wide range of NBA data through a simple and well-documented API. Whether you're building a fantasy basketball application, analyzing player performance, or just exploring NBA statistics, this API can provide the data you need.
- Comprehensive NBA data coverage.
- Easy-to-use RESTful API.
- Well-structured data responses (JSON).
- Clear and concise documentation.
-
Clone the repository:
git clone [[https://github.com/YOUR_USERNAME/nba_data_api.git](https://www.google.com/search?q=https://github.com/YOUR_USERNAME/nba_data_api.git)](https://github.com/edgarjrivera/nba_data_api.git) cd nba_data_api
-
Create a virtual environment (recommended):
python3 -m venv venv source venv/bin/activate *(Linux/macOS)* venv\Scripts\activate *(Windows)*
-
Install the dependencies:
pip install -r requirements.txt
-
Run the application:
python app.py
Provide a brief example of how to use the API with a code snippet. For example:
import requests
base_url = "http://localhost:5000/api" # Or your deployed URL
# Get player info
player_id = 12345 # Example player ID
response = requests.get(f"{base_url}/player/{player_id}")
player_data = response.json()
print(player_data)
# ... other API calls