Project Overview
This API service was developed using FastAPI, designed to check whether a given number is a perfect number. The application provides a RESTful endpoint where users can input a number, and the API determines if the number meets the criteria of a perfect number. The project was built with best practices in API development, containerization, and cloud deployment in mind.
Technologies Used
FastAPI: For building the high-performance API.
Docker: To containerize the application for scalability and deployment.
GitHub Actions: For automating CI/CD workflows.
Pytest: To ensure robust API testing before deployment.
Google Cloud Platform (GCP): For deploying the application in a cloud environment.
Nginx: Used as a reverse proxy to serve the application efficiently.
Key Features
FastAPI-based endpoint for checking perfect numbers.
Input validation to handle incorrect or missing parameters.
JSON response formatting for structured output.
Automated testing with Pytest to ensure reliability.
CI/CD pipeline for continuous integration and deployment on GCP.
Dockerization for consistent and scalable deployment.
Challenges & Solutions
Invalid Input Handling: Implemented validation to ensure only valid integers are processed.
JSON Response Format Issues: Refactored response handling to return proper JSON objects.
Deployment Complexity: Automated deployment using GitHub Actions, Docker, and GCP to streamline the process.
Lessons Learned
This project deepened my understanding of API development with FastAPI, as well as best practices in containerization (Docker) and cloud deployment (GCP). Implementing CI/CD pipelines helped automate testing and deployment, improving efficiency and reducing manual errors.
Skills Demonstrated
FastAPI – API development & validation
Docker – Containerization & deployment
GitHub Actions – CI/CD automation
Pytest – API testing
Nginx – Reverse proxy configuration
Google Cloud Platform (GCP) – Cloud deployment
Postman – API testing & debugging