Exemplo n.º 1
0
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)
Exemplo n.º 2
0
 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()
Exemplo n.º 3
0
 def initialize(self):
     self.mysql_client = MySQLUtils()
     self.fdfs_client = FDFSUtils()
     self.res_status = dict()
Exemplo n.º 4
0
 def initialize(self):
     self.set_header('Content-type', 'application/json')
     self.mysql_client = MySQLUtils()
     self.res_status = dict()
Exemplo n.º 5
0
 def initialize(self):
     self.mysql_client = MySQLUtils()