Files
- main.py = .py file in which the top-level code is executed
- tasks.py = development of asynchronous tasks
- utils.py = Functions and objects required to perform the main process
- conf_celery.py = Configuration for integrating Flask with Celery
- requirements.txt = Libraries installed in the development environment
To start the program you must first
-
Activate venv: source/bin/activate
-
Installing requirements.txt
-
processing_large_data-main/: python3 main.py
-
In terminal: celery -A tasks.celery worker
-
APi "/upload/<name_file>":
- curl -X POST http://127.0.0.1:5000/upload/songs_normalize.csv On Post request, it processes the file storing it with the name: output-{date}.csv The task id is printed on the terminal screen.
-
API "/task/<task_id>"
- curl -X GET http://127.0.0.1:5000/task/5f16e1d5-d904-472a-b1f6-139c20591d22. In case the task is finished, it returns on the terminal screen the result of the processed csv.
Note: Include data in csv format in /data file