$npx skillfedfor your agent

psycopg2-pool

Proper pooling of psycopg2 connections

With conditionsPyPI DatabaseReleased Jan 2024311.4K downloads / moLGPL3Pure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — psycopg2_pool-1.2-py2.py3-none-any.whl
v1.2 · released 2024-01-15 · Python >=3.3 · 1 runtime deps: psycopg2-binary

Yes, if you are building a multi-threaded Python application that queries PostgreSQL frequently. The package is simple, has low install friction, carries no known vulnerabilities, and solves a real problem. The dormant maintenance status is a minor concern—monitor for breaking changes in psycopg2 or PostgreSQL—but the code is stable. Be aware of the LGPL3 copyleft license if your application is proprietary.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires psycopg2-binary installed; application must manage connection lifecycle (getconn/putconn calls).
  • Low friction: pure Python wheel with a single runtime dependency on psycopg2-binary.
  • Maintenance is dormant—last commit was 2024-05-10—but the package is marked Production/Stable.

License · maintenance · safety

LGPL3 (copyleft) — Licensed under LGPL3 (copyleft). Any application that links this library must make its own source code available under a compatible license or comply with LGPL3's linking exceptions.

last release 2024-01-15 (942 days) · last repo commit 2024-05-10 · 4 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 311,370 downloads/mo, #7,735 on PyPI

Verify before relying

pip install psycopg2-pool

from psycopg2_pool import ThreadSafeConnectionPool

pool = ThreadSafeConnectionPool(1, 10, "dbname=test user=postgres")
conn = pool.getconn()
# use conn
pool.putconn(conn)
  • Whether the dormant maintenance status (942 days since latest release) poses a risk for future PostgreSQL or psycopg2 compatibility.
  • Performance characteristics and overhead compared to other pooling solutions.
  • Specific threading model and concurrency limits of ThreadSafeConnectionPool.
Same gist for agents: .md · .json

What it is and what it does

psycopg2-pool wraps psycopg2 to provide thread-safe connection pooling for PostgreSQL. Instead of opening and closing a new database connection for each request—an expensive operation—the pool maintains a set of open connections that applications can borrow and return, reducing latency and resource consumption in concurrent workloads.

The package exports a ThreadSafeConnectionPool class that manages a minimum and maximum number of connections, handing them out on demand and recycling them back into the pool. It is designed for multi-threaded Python applications that make frequent database queries and need to amortize connection setup costs. The library depends only on psycopg2-binary and installs as a pure Python wheel.

Use it for

  • Web applications serving concurrent requests that each need a database connection.
  • Multi-threaded batch processing jobs that query PostgreSQL repeatedly and need to avoid connection exhaustion.
  • Long-running services that spawn worker threads and need a shared, thread-safe pool of database connections.
  • Testing frameworks that run parallel test suites against a shared PostgreSQL database.
  • Applications requiring reduced connection setup latency in high-concurrency scenarios.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you are building a multi-threaded Python application that queries PostgreSQL frequently.

The package is simple, has low install friction, carries no known vulnerabilities, and solves a real problem. The dormant maintenance status is a minor concern—monitor for breaking changes in psycopg2 or PostgreSQL—but the code is stable. Be aware of the LGPL3 copyleft license if your application is proprietary.

Install

psycopg2-pool on PyPI

Before you install

Low friction: pure Python wheel with a single runtime dependency on psycopg2-binary. Maintenance is dormant—last commit was 2024-05-10—but the package is marked Production/Stable.

Requires psycopg2-binary installed; application must manage connection lifecycle (getconn/putconn calls).

License in practice

Licensed under LGPL3 (copyleft). Any application that links this library must make its own source code available under a compatible license or comply with LGPL3's linking exceptions.

Quickstart

pip install psycopg2-pool

from psycopg2_pool import ThreadSafeConnectionPool

pool = ThreadSafeConnectionPool(1, 10, "dbname=test user=postgres")
conn = pool.getconn()
# use conn
pool.putconn(conn)

Verify before relying

  • Whether the dormant maintenance status (942 days since latest release) poses a risk for future PostgreSQL or psycopg2 compatibility.
  • Performance characteristics and overhead compared to other pooling solutions.
  • Specific threading model and concurrency limits of ThreadSafeConnectionPool.

Package facts

LicenseLGPL3 copyleft
Python supportSupports the current Python release >=3.3
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
psycopg2-binary
MaintenanceDormant 942 days since the last release
Last repo commit
First released
Downloads311,370 / month, #7,735 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableIntended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: Python

Evidence: psycopg2_pool-1.2-py2.py3-none-any.whl

Tags

Capabilities
psycopg2 connection poolingpostgresql connection poolthread-safe database connectionsreuse postgres connectionsconnection pool managementpsycopg2 thread pooldatabase connection caching
Topics
connection-poolingpostgresqlconcurrency
PyPI keywords
postgrespsycopg2

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “psycopg2 connection pooling”

  • psycopg2-poolManages a pool of reusable PostgreSQL connections via psycopg2,…
  • queriesQueries is a simplified wrapper around psycopg2 that provides a…
  • aiopgaiopg provides asyncio-based access to PostgreSQL databases, wrapping…

Give your agent the search over MCP, or paste the wish link into any chat.

More Database packages

psycopg2-binary Worth it
PyPI · Software Development · released Apr 2026

psycopg2-binary is a PostgreSQL database adapter for Python that implements the DB API 2.0 specification, enabling Python applications to connect to and query PostgreSQL databases with thread-safe concurrent operations.

copyleftcompiled wheel · 3.9+
271.6Mdownloads / mo
redis Worth it
PyPI · Database · released Jul 2026

Python client library for connecting to and executing commands against Redis key-value stores, supporting both synchronous and asynchronous operations.

Install it if your application needs to interact with Redis; the only prerequisite is a running Redis server instance.

MITpure Python · 3.10+
268.3Mdownloads / mo
ydb Worth it
PyPI · Database · released Jul 2026

YDB Python SDK is the official client library for connecting to and querying YDB databases from Python applications.

Install it if you need to connect Python applications to YDB databases.

permissive licensepure Python · 3.10+
210.0Mdownloads / mo
snowflake-connector-python Worth it
PyPI · Software Development · released Aug 2026

Connects Python applications to Snowflake data warehouses using the DB API 2.0 specification, enabling SQL queries, data transfers, and warehouse operations.

Apache-2.0compiled wheel · 3.10+
193.6Mdownloads / mo
sqlparse Worth it
PyPI · Software Development · released Aug 2026

sqlparse tokenizes SQL text into a tree of statements, clauses, and expressions, and provides functions to split scripts, format queries, and inspect parsed tokens without validating dialect or syntax.

Install it if you need to manipulate, format, or analyze SQL text programmatically.

BSD-3-Clausepure Python · 3.10+
148.9Mdownloads / mo
dbt-adapters With conditions
PyPI · Database · released Jul 2026

Provides base adapter protocols and shared functionality that database adapters use to integrate with dbt-core, handling connections, dialect translation, relation caching, and core interface management.

Apache-2.0pure Python · 3.10.0+
121.3Mdownloads / mo

See also DBUtils · postgres · psycopg-pool · queries · pgcopy · django-db-connection-pool · clickhouse-pool · django-db-geventpool · connection_pool · psycopg2