The Eagles API is a RESTful API built with Python & FastApi that provides basic player information for players on the current roster of the Philadelphia Eagles. The API is deployed to a Google Cloud Run instance.
https://eagles-api-service-189864895985.us-east1.run.app/api/v1-
GET /api/v1/players - Retrieves all players. -
GET /api/v1/players/random - Retrieves a random player. -
GET /api/v1/players/:jerseyNumber - Retrieves a player based on the inputted jersey number. -
GET /api/v1/players/position/:position - Retrieves players based on the inputted position.
- Create a virtual environment.
$ python3 -m venv venv- Activate virtual environment & install dependencies
# Activate it (Mac/Linux)
source venv/bin/activate
# Or on Windows
venv\Scripts\activate
# Then install dependencies
pip install -r requirements.txtpython3 -m scripts.update_rosterTo run the app, use the following commands:
$ uvicorn app.main:app --reload
# Define a port
$ uvicorn app.main:app --reload --port 8080To run the app with Docker, use the following commands:
docker build -t eagles-api .
docker run -p 8000:8080 eagles-api