https://github.com/kaikymoura/backcourt-api
Repository for the Basketball Advanced Stats API
https://github.com/kaikymoura/backcourt-api
fastapi nba-api nba-stats numpy pandas python swagger uvicorn
Last synced: 5 months ago
JSON representation
Repository for the Basketball Advanced Stats API
- Host: GitHub
- URL: https://github.com/kaikymoura/backcourt-api
- Owner: kaikyMoura
- License: mit
- Created: 2025-02-11T18:33:43.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-04-16T22:22:00.000Z (6 months ago)
- Last Synced: 2025-04-16T23:09:50.503Z (6 months ago)
- Topics: fastapi, nba-api, nba-stats, numpy, pandas, python, swagger, uvicorn
- Language: Python
- Homepage:
- Size: 47.9 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
BackCourt Api
Repository for the BackCourt | NBA Stats & News Api

[](https://app.codacy.com/gh/kaikyMoura/BackCourt-api/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)



### 1. About the Project
This project is a FastAPI-based web scraping API designed to collect and provide advanced basketball statistics from various online sources. The API fetches articles and data related to basketball using web scraping techniques, processes the extracted information, and serves it through RESTful endpoints. Also, it uses the [nba_api](https://github.com/swar/nba_api) retrieve official NBA statistics.
### 2. Key Features
- Fetches basketball-related articles from multiple websites
- Extracts relevant data using BeautifulSoup
- Provides endpoints to access filtered and categorized statistics
- Optimized for performance with FastAPI and asynchronous requests
- Supports query parameters to filter data by team, player, source, etc.### 3. Technologies
![]()
![]()
![]()
![]()
### 4. Installation and Virtual Environment Activation
First, you need to create a virtual environment:
```console
python -m venv venv
or
python3 -m venv venv
```Then, active it:
```console
# Windows (cmd)
venv\Scripts\activate# Linux/macOS (bash)
source venv/bin/activate
````After setting up the environment, install the dependencies:
You can install the dependencies using the requerements.txt file:
```console
pip install -r requirements.txt
``````console
pip install fastapi uvicorn requests beautifulsoup4 numpy pandas nba_api
```### 5. Running
``` console
uvicorn app.main:app --reload
```### 6. OpenApi Documentation
- Every new endpoint is automatically added to the documentation.
- You can access the documentation to learn how to use it:```bash
http://localhost:8000/docs
```### 7. Deployment
The deployment is done using Google Cloud Run and Cloud Build, which allows you to easily deploy your application to Google Cloud Platform.- [Google Cloud Platform](https://cloud.google.com/)
- [Google Cloud Run](https://cloud.google.com/run)
- [Google Cloud Build](https://cloud.google.com/build)### 8. Terms of Use
- This repository has no commercial or business intentions
- All rights are reserved to the [NBA](https://www.nba.com).
- Check the [Terms of Use](https://www.nba.com/termsofuse#ownership-and-use-restrictions) to learn about the usage of the data.