import MySQLdb

# Download Guest List.csv from Facebook event page and copy it to a file named
# 'list.csv'. Remove the first line (column title) and the '"'s around each
# name (they cause trouble with MySQL)
filename = "list.csv"
data = open(filename, 'r');
guests = [];

db_host = "" # Add your host
db_user = "" # Add your user
db_password = "" # Add your password
db_name = "" # Add your database name
db_table = "" # Add your table name

for line in data:
   person = line.split(',')
   guests.append([person[0].strip(), person[1].strip()])

print("Number of guests {}\n".format(str(len(guests))))

db = MySQLdb.connect(db_host, db_user, db_password, db_name)
cursor = db.cursor()

for person, status in guests:
   print("Adding " + person + " status: " + status)
   cursor.execute("INSERT INTO {} (name, status)\
         VALUES (\"{}\", \"{}\")".format(db_table, person, status))

# Clean up
cursor.close()
db.commit()
db.close()

@@ -7,16 +7,28 @@
  MySQLdb
+%0Aimport json
 %0A%0A# Down
@@ -263,17 +263,16 @@
 me, 'r')
-;
 %0Aguests 
@@ -279,179 +279,95 @@
 = %5B%5D
-;
 %0A%0A
-db_host = %22%22 # Add your host%0Adb_user = %22%22 # Add your user%0Adb_password = %22%22 # Add your password%0Adb_name = %22%22 # Add your database name%0Adb_table = %22%22 # Add your table name
+# Config Setup%0Aconfig_file = open('config.json', 'r')%0Aconfig = json.load(config_file)
 %0A%0Afo
@@ -550,46 +550,87 @@
 ect(
-db_host, db_user, db_password, 
+config%5B'db_host'%5D, config%5B'db_user'%5D, config%5B'db_password'%5D,%0A config%5B'
 db_name
+'%5D
 )%0Acu

Use config file in import script