Skip to content

Microservice architecture for 3 math operations: exponentiation, fibonacci and factorial

License

Notifications You must be signed in to change notification settings

hedrox/micromath

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Micromath

Toy microservice architecture for 3 math operations: exponentiation, fibonacci and factorial

Requirements

  1. Python >=3.8
  2. Docker

Installation

python setup.py install

Build

docker-compose up -d

Example usage

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')

Destory

docker-compose down --rmi all

Architecture

TODO

  • Reverse proxy (nginx)
  • TLS support
  • Refactor the routes with Viewes, they can achieve better code quality than routes

About

Microservice architecture for 3 math operations: exponentiation, fibonacci and factorial

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published