Не знаю что ты хотел, но вот тебе маленький пример записи из JSON, записываем address_id, address, и address2
myjson ={"address_id":"132", "address":"Decebal", "address2":"Traian", "district":"1", "city_id":456, "postal_code":3443, "phone":446649, "location":"Moldova", "last_update":12.12}
def add(address_id, address, address2):
connection = pymysql.connect(host='localhost',user='root', password='', db='base', charset='utf8mb4', cursorclass=pymysql.cursors.DictCursor)
try:
with connection.cursor() as cursor:
sql = "INSERT INTO MyTable (`address_id`, `address`, `address2`) VALUES (%s, %s, %s)"
cursor.execute(sql, (address_id, address, address2))
connection.commit()
finally:
connection.close()
#Запускаем функцию
add(myjson['address_id'] , myjson['address'] , myjson['address2'] )