This project aims to be a React component integrable into any site allowing users to upload CSV data and match their CSV files headers (i.e., the values in the first row) to pre-assigned JSON headers. It's built using React and Bootstrap for the frontend, and Flask for the backend. Eventually, the JSON data will be written to an SQLite database.
- First, clone the repository to your computer
- Navigate to
react-frontend
and runnpm -i
andnpm run build
. This will build the current version of the project to the folder Flask will eventually serve cd ..
and then move into theflask-backend
directory. Install Flask if you haven't already using pip, and then begin the server by runningpython main.py
(however, you will probably have to take all of the steps below to actually get things working)
You will likely to install the various Python dependencies needed by the project. To do so, it is recommended you create a virtual environment.
- Navigate to to the
flask-backend
folder in your terminal - Execute
python -m venv env
. Check the/env
folder has been created and that it is being ignored - Begin the virtual environment by running
env\Scripts\activate.bat
- you may check it's running by executingwhere python
- Run
pip install -r requirements.txt
to install all dependecies - If you make any changes to the requirements, run
pip freeze > requirements.txt
to save then
TBD
- Navigate to to the
flask-backend
folder in your terminal - Type
python
to open a Python terminal - First execute
from main import db
- Then, to actually create the tables needed, run
db.create_all()
- If you have an old version of the database, just delete the file, or write
db.drop_all()
This tool is being developed for Artesian Software, a Industrial IoT solution provider based in Alberta. The tool will allow farmers to upload their sensor data to Artensian's servers with an easy to use interface.
TBD