PyMySQL Pool is a high-performance MySQL connection pool built on top of PyMySQL, supporting connection reuse, configurable pool limits, connection lifetime management, and automatic rollback/re-autocommit on return. Version 0.5.0 (stable) supports Python >=3.7, last release 2022-06.
pip install pymysql-poolNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Create a pool, borrow a connection via get_conn(), use it, then release it back.
Use maxsize=... instead of max_size=...
Use pool.available_num and pool.total_num instead.
Always call pool.release(conn) in a finally block or use context manager (pool.connection()) if available.
Use 'from pymysqlpool import ConnectionPool' after pip install --upgrade pymysql-pool.
Set con_lifetime (in seconds) to a value less than MySQL wait_timeout, e.g. pool = ConnectionPool(..., con_lifetime=3600).
Use maxsize=... instead.