- Nth Fibonacci Number
- Factorial of a given Number
- Ackermann Function
- Python >= 3.6 (tested under Python 3.9.6 & 3.10.4)
-
Open the cmd
-
git clone https://github.com/doddahulugappa/MathWebService.git
-
cd MathWebService
(to project folder)
-
python -m venv venv
optional (to create virtualenv) -
venv\Scripts\activate
optional (to activate virtualenv)
pip install -r requirements.txt
python app\database\dboperation.py
- execute
pytest
to test the API
- execute
uvicorn app.main:app --reload
to run the API
- http://<HOST>:<PORT>/docs
pip install mangum
- Create S3 Bucket
- Upload Zip File
- Package Lambda
- Upload Zip File to S3
- Create AWS Lambda
- Update Handler
- Test FastAPI Lambda
- Create API Gateway
- Choose the Protocol
- Create Root Proxy Method
- Create Resource
- Deploy Lambda Proxy API
cd MathWebService
docker build -t mathwebservice .
docker run -it -p 8000:8000 mathwebservice
This API is using basic authentication and jwt token authorization. Firstly we will have to signup to get the jwt token which is valid for 5 minutes and use the token as authorization to call other API endpoints. If already signed up, we just need to signin to get the jwt token.