python DbUtils 封装

python dbutils 简介及准备工作

DBUtils是一套Python数据库连接池包,并允许对非线程安全的数据库接口进行线程安全包装。DBUtils来自Webware for Python。

DBUtils提供两种外部接口:

  • PersistentDB :提供线程专用的数据库连接,并自动管理连接。
  • PooledDB :提供线程间可共享的数据库连接,并自动管理连接。
    需要库
    1、DBUtils pip install DBUtils
    2、pymysql pip install pymysql/MySQLdb

猜你喜欢

转载自www.cnblogs.com/sunxiuwen/p/10262317.html