$ # Install python dependencies
$ pip install -r requirements.txt
$ # Configure Flask entrypoint
$ export FLASK_APP=server.py
$ # In windows
C: set FLASK_APP=server.py
$ # Run flask dev server
$ flask run --port 5001
$ # Run flask dev server available outside of localhost
$ flask run --host 0.0.0.0 --port 5001
MySQL connection must be set up in the secrets.json file. The server used must have the set up script run on it.
- flask: Web framework Quickstart documentation
- flask_cors: A Flask extension for handling Cross Origin Resource Sharing (CORS). Documentation
- requests: To send HTTP requests to retrieve API results Documentation
- mysql.connector: Allow connexions with MySQL databases. Used through the wrapper DB.py. Documentation
- google-auth: Verification and decoding of OAuth token ids. It's client ID must be set up in the secrets.json file. Documentation
- locust.io: Optional. Allows the execution of load testing. More information on usage at load testing. Documentation
- Open Data Malaga: Open data repository, no apikey required. Link
To run load testing:
$ locust -f load_testing.py --host=http://localhost:5001
After launching it go to http://localhost:8089 and set the number of concurrent users and spawn rate.