This project is a fully functional Python microservice application that covers the full software engineering lifecycle:
- 🔧 CLI Tool using Python's fire library
- 🌐 FastAPI Web Service with REST endpoints
- 🧪 Unit testing with Pytest and coverage reports
- 💅 Code quality enforcement with black and pylint
- ⚙️ Automated workflow using GitHub Actions (CI)
- ☁️ Cloud Deployment via AWS CodeBuild, ECR, and App Runner (CD)
- 🐳 Containerized using Docker
This project demonstrates industry-level practices in Continuous Integration (CI) and Continuous Deployment (CD) for scalable and maintainable services.
# Create a virtual environment virtualenv ~/.venv source ~/.venv/bin/activate # Install dependencies make install
Makefile automates all important commands like installing dependencies, formatting code, running tests, and building Docker images.
- Written using pytest and pytest-cov for code coverage
- Run tests:
make test
- black for code formatting
- pylint for code linting
make format make lint
CI will fail if linting or formatting checks do not pass.
- fire is used to run Python functions from the terminal.
chmod +x cli-fire.py # View help ./cli-fire.py --help # Search Wikipedia ./cli-fire.py --name Barack_Obama
- Built and tested Docker container locally
make build make run
- Automated workflow using .github/workflows/devops.yml
- Runs lint, format, test, and build on every commit
- Mirroring GitHub Actions CI inside AWS
- Managed with buildspec.yml
- Automatically pushes Docker image to AWS ECR
- ECR (Elastic Container Registry)
- Created ECR repo and pushed image via CodeBuild
- Connected ECR with App Runner
- Auto-deploy on every new ECR image update
- Python
- FastAPI
- Fire (CLI)
- Docker
- Pytest
- Black, Pylint
- GitHub Actions
- AWS CodeBuild, ECR, App Runner
🎉 Python Microservice + CI/CD + Docker + AWS project completed successfully!