- Data is listed below for one ticker symbol. Create a table in a database (Postgres or MySQL). Use Python to insert data into the database.
- Build a simple app with React frontend and FastAPI backend. The user has two options:
a. Upload Data: By clicking this button, the user should upload the CSV data and with the help of Rest APIs, the FastAPI backend should insert the data in the DB. b. Get data: On clicking this button, the API should fetch data from the DB and display it on the React frontend as a table.
Make a .env file in api folder of backend and fill DATABASE_NAME,MYSQL_USER,MYSQL_PASSWORD
cd backend
pipenv install fastapi dotenv mysql.connector
pipenv shell
cd api
uvicorn main:app --reload
Backend would be up and running!
cd frontend
npm i
npm run start
Frontend would be up and running!
File uploaded here is HINDALCO_1D which is a csv file which you need to download and upload by choosing select file