[Add a concise tagline describing your service in a few words]
- Provide a clear description of what your service does, the problem it solves, and its primary features.
- Prerequisites:
- Python
- FastAPI
- Docker
- Clone the repository:
git clone https://github.com/tssovi/popular-github-repo.git
- Create a virtual environment:
python -m venv env source env/bin/activate
- Install dependencies:
pip install -r requirements.txt
The following Makefile commands are provided to manage and interact with the application. Ensure you have both Docker and Docker Compose installed.
- Start the API in detached mode:
make up
- Stop and remove containers, networks, volumes, and images:
make down
- Build the Docker images:
make build
- Run the API container:
make start-api
- Run tests:
make run-test
- Clean up test artifacts:
make clean
-
/is-popular
(POST)- Description: Determines if a GitHub repository is popular based on its stargazers and forks counts.
- Parameters:
- owner (str): The owner of the repository.
- repo (str): The name of the repository.
- Example Request (JSON):
{ "owner": "facebook", "repo": "react" }
- Example Response (JSON):
{ "repository": "facebook/react", "is_popular": true, "score": 12345, "response_time": 0.231 }
-
/health
(GET)- Description: Performs a basic health check of the service.
- Example Response (JSON):
{"status": "OK"}