This project is demonstrate to those who wants to work with microservices in python. I have created demo APIs for users and products module. I have created API using AWS dynamodb and AWS S3 service.
To run this project, you will need to add the following environment variables to your .env file
AWS_ACCESS_KEY
AWS_SECRET_KEY
AWS_REGION
AWS_BUCKET_NAME
Clone the project
git clone https://github.com/sky-flutter/python-fastapi-microservices.gitGo to the project directory
cd python-fastapi-microservicesRun docker-compose.yaml
docker compose upHit API URL in postman
http://localhost:8085/api/v1/user
http://localhost:8085/api/v1/productBuild docker images from project root directory
docker build -t python-microservices-products products/
docker build -t python-microservices-users users/Move images to minikube using
minikube image load python-microservices-products
minikube image load python-microservices-usersMap IpAddress to DNS name in hosts file
127.0.0.1 rx.cloths.comGo to the k8s directory
kubectl apply -f .Hit API URL in postman
http://rx.cloths.com/user
http://rx.cloths.com/product