To download SQL file and Csv files check releases
For more information, please visit the API repo or the Project Roadmap.
+---------------------+
| Tables_in_ganjoor |
+---------------------+
| categories |
| categoriesancestors |
| poems |
| poets |
| verses |
+---------------------+
docker run -d -p 33699:3306 aminsharifi/ganjoor-db
- Clone Repo
git clone https://github.com/bigmpc/ganjoor-db
- cd to repo dir
cd ganjoor-db
- make docker image
docker build --tag=ganjoor-db .
- run docker image
docker run -d -p 33699:3306 ganjoor-db
mysql -u root -p 'root' -h 127.0.0.1 -P 33699 -D ganjoor
- install python driver
mysql-connector-python-rf
with pip(pip3)
pip install mysql-connector-python-rf
- connect to database
# import python packge
import mysql.connector
# connect to database
connection = mysql.connector.connect(user='root', password='root',
host='127.0.0.1',
database='ganjoor',
port='33699')
# close connection after work
connection.close()
# if pandas is not installed on your machine , check pandas installation
import pandas as pd
# use pd.read_sql(SQL, connection)
# sample for reading all categories into one Pandas DataFrame
categories_df = pd.read_sql("select * from categories", connection)