Black Lives Matter. Please consider donating to Black Girls Code today.
Learn how to use COVID-19 data in open source Dash apps. Register for the Sept 23rd webinar with IQT!

Real-time graphs from MySQLdb

Hello! Good day! First, I’m a beginner in using Raspberry Pi, plotly, python and most of all, integrating all of them. I want to graph the data from my sensors and display it in my website in a time series chart. I have done the simple tutorial wherein I send data from my python in Raspi and the graph can seen in my account here in plotly. From my code which I got in the Internet, it has the following starting lines:

import serial
import time
from time import sleep
import MySQLdb
from datetime import datetime
import RPi.GPIO as GPIO
import os

.
.
.

db = MySQLdb.connect(“localhost”, “admin1”, “admin1234”, “projectgen”)
curs=db.cursor()

Is there I should download wherein I can get the data stored in my Raspberry Pi (specifically my SD card) so that I can just call it in code to graph it in time series chart? I feel that I am really close. Please help me. Thank you!