This repository contains coding developed for Vivo's 4th Platform* job application.
🐍 Python was the programming language chosen to solve the test.
* To learn more about Vivo's 4th Platform.
- 📄 Test subject (PDF)
- 📁 Exercice 1 - an algorithm that counts how many times each element in a given array occurs in a given matrix.
- 📁 Exercice 2 - exercise 1 algorithm transformed into an API RESTful.
- 📁 Exercice 3 - an API that reads a race log file and calculates race results.
1. Install venv
$ sudo apt install python3-venv
2. Create new virtual environment - creates venv\
$ cd my_flask_app
$ python3 -m venv venv
3. Activate virtual environment - (venv) $
is shown in shell's prompt
$ source venv/bin/activate
4. Deactivate virtual environment
(venv) $ deactivate
1. Installing Numpy
(venv) $ pip install numpy
1. Installing Pandas
(venv) $ pip install pandas
1. Installing Flask and packages
(venv) $ pip install Flask
(venv) $ pip install flask-restful
Note: within the virtual environment, you can use the command pip instead of pip3 and python instead of python3.
2. Verify the installation
(venv) $ python3 -m flask --version
3. Run the application
(venv) $ export FLASK_APP=app.py
(venv) $ flask run
Note: for Debug mode to be activated, run the following instead:
(venv) $ export FLASK_ENV=development
(venv) $ export FLASK_APP=app.py
(venv) $ flask run
Installing Pytest and Coverage:
(venv) $ pip install pytest coverage pytest-cov
- Flask installation - from documentation
- Flask installation - tutorial
- Flask-RESTful documentation
- Flask RESTplus Tutorial (studies-diary)
- How do you POST a JSON file with curl??
- RESTful-Flask parsing JSON Arrays with parse_args()
- Pandas - convert minutes to second
- TDD com Flask e Unittest
- Flask documentation - Testing Flask Applications
- Flask documentation - Handling Application Errors