def main(): cfg = { 'host': '192.168.158.11', 'port': 3306, 'user': '******', 'passwd': 'maixiaochai_p', 'db': 'maixiaochai_db' } db = MySQLUtils(**cfg) result = db.has_table('maixiaochai_t') print(result)
def initialize(self): """ 第一步执行,初始化操作 :return: """ self.set_header('Content-type', 'application/json') self.upload_dir = FDFS_CONFIG.get('tmp_path') if not os.path.exists(self.upload_dir): os.mkdir(self.upload_dir) self.fdfs_client = FDFSUtils() self.mysql_client = MySQLUtils() self.file_tmp_path = None self.res_status = dict() self.file_info = dict()
def initialize(self): self.mysql_client = MySQLUtils() self.fdfs_client = FDFSUtils() self.res_status = dict()
def initialize(self): self.set_header('Content-type', 'application/json') self.mysql_client = MySQLUtils() self.res_status = dict()
def initialize(self): self.mysql_client = MySQLUtils()