How to generate grafana dashboard using python

I need to create Grafana dashboard using python so I found a library called grafanalib.( but I am a bit confused with this so provide any better solutions or any info, In code how to add data sources like MySQL. Please help me and
I am very thankful in advance.