pymysql 사용 - 기본사항 및 팁
pymysql 커서 생성 import pymysql from pymysql.cursors import DictCursor def createCursor(): return pymysql.connect( host='', port=3306, user='', passwd='', db='', autocommit=True, charset='utf8', # cursorclass=DictCursor, ).cursor() SQL 쿼리 호출 from pymysql.cursors import Cursor cursor = createCursor() assert isinstance(cursor, Cursor) # IDE에 객체 타입 명시 tval_i = 3 tval_s = 'test' cursor.execute('select ..
Programing/Python3
2016. 12. 28. 09:31