API Rest to received a number (between -99999 and 99999) and convert to number in extensive
- Requirements
- Setup
- Running
- Running with Shell
- Code Documentation
- Code Analysis
- Execute Unit Test
- Accessing API URLs
To run this project, you need to install the Docker and Docker Compose.
To set up the container, you need to execute:
docker-compose build
This command will build the container follow the steps in Dockerfile
.
You can run the job with the command:
docker-compose up
This command will start the API Rest.
To run with shell, you need to execute:
docker-compose run --service-ports api sh
After that, you can execute all make commands. So, if you want to run the API you need to execute:
make run
If you want to see the documentation of code, you need to execute the following command after run the container with shell:
make docs
Now, you can access the code documentation opening the file docs/build/index.html
If you want to analyze your python code that was written inside the src
folder, you need to execute the following command after run the container with shell:
make lint
If you want to execute the unittest, you need to execute the following command after run the container with shell:
make tests
To access the URLs of API, you can use the command line curl or the Postman
To convert a number to number in extensive, you need execute the following example:
curl -X GET http://127.0.0.1:5000/99999