dic = {'office': {'component_office': ['Word2010SP0', 'PowerPoint2010SP0']}}
d = str(dic)
sql = 'INSERT INTO ep_soft(ip_address, soft_data) VALUES (%r, %r)' % (
    '192.xxx.xx.xx', d)
How to store python dictionary in to mysql DB through python