Toy microservice architecture for 3 math operations: exponentiation, fibonacci and factorial
- Python >=3.8
- Docker
python setup.py install
docker-compose up -d
import requests
sess = requests.Session()
sess.post('http://localhost:8080/api/v1/pow', json={'base': 2, 'power': 3})
sess.post('http://localhost:8080/api/v1/fibonacci', json={'number': 10})
sess.post('http://localhost:8080/api/v1/factorial', json={'number': 10})
logs = sess.get('http://localhost:8080/api/v1/logs?page=1')
docker-compose down --rmi all
- Reverse proxy (nginx)
- TLS support
- Refactor the routes with Viewes, they can achieve better code quality than routes