base.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:PyPlanet 作者: PyPlanet 项目源码 文件源码
def connect(self):
        await self.instance.db.connect()
        await self.instance.apps.discover()
        await self.instance.db.initiate()

        if self.db_type != 'mysql':
            raise Exception('We only support mysql converting right now!')

        self.connection = pymysql.connect(
            host=self.db_host, user=self.db_user, password=self.db_password, db=self.db_name, charset=self.charset,
            port=self.db_port or 3306,
            cursorclass=pymysql.cursors.DictCursor
        )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号