skillfed

connection_pool

thread safe connection pool

connection-pool v0.0.3 104.6K downloads/30d#12,747 on PyPI16
Permissive license MIT Abandoned released

What it is and what it does

ConnectionPool is a lightweight library that wraps connection creation and lifecycle management into a reusable pool. You provide a factory function that creates connections, and the pool manages a bounded set of them, reusing connections across threads and retiring them after a configurable idle time or total usage count. It exposes a context-manager interface so you can acquire and release connections in a safe, predictable way.

The package is designed for scenarios where creating a new connection is expensive and you want to avoid the overhead of establishing a fresh connection for every operation. It has no external runtime dependencies and works with any connection type you can wrap in a factory function.

Use it for:

  • Manage a pool of client connections across multiple threads in a web application.
  • Reuse connections in a long-running service without exhausting system resources.
  • Limit concurrent connections to an external service by bounding the pool size.
  • Automatically retire stale connections after a configurable idle period to free resources.
  • Simplify thread-safe connection handling in multi-threaded Python applications.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides a thread-safe connection pool that manages reusable connections to external services, allowing you to configure pool size, connection lifetime, and idle timeouts.

No. The package is abandoned (last update 2020-09-17, 2157 days ago) and classifiers indicate support only for Python 2.7 and 3.4–3.6, which are all end-of-life. No known vulnerabilities, but the lack of maintenance means compatibility issues with modern Python versions are unlikely to be fixed. Consider an actively maintained alternative for production use.

Install

connection-pool on PyPI

pip

pip install connection-pool

uv

uv add connection-pool

poetry

poetry add connection-pool

Installing connection_pool

Before you install

High install friction: the package has been abandoned since 2020-09-17 with no updates in 2157 days. No runtime dependencies, but the age and lack of maintenance signal suggest compatibility issues with modern Python versions are unlikely to be addressed.

License in practice

MIT license is permissive and imposes no restrictions on use, modification, or distribution in proprietary or open-source contexts.

Quickstart

pip install connection_pool

from connection_pool import ConnectionPool

pool = ConnectionPool(create=lambda: None, max_size=10, idle=60)
with pool.item() as conn:
    pass

Requires a running service to connect to. Package classifiers indicate Python 2.7 and 3.4–3.6 support; compatibility with modern Python versions is unverified.

Verify before relying

  • Whether the package works reliably with Python 3.7 and later versions, given the last release was 2020-09-17.
  • Whether thread safety guarantees hold under concurrent load in production scenarios.
  • Whether this package is maintained or if a fork or alternative is actively supported.
  • Real-world usage patterns and whether the pool parameters (max_size, max_usage, idle, ttl) meet typical application needs.

Package facts

License MIT (permissive)
Python support not specified
Install friction high — source build required
Runtime dependencies none
Maintenance abandoned — 2,157 days since the last release
Last repo commit
First released
Downloads 104,568/month — #12,747 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: connection_pool-0.0.3.tar.gz

Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: ImplementationTopic :: Software Development :: Libraries :: Python Modules

Tags

thread-safe connection poolconnection pooling pythonreusable connection managementpool max size idle timeoutconnection lifecycle managementconcurrent connection managementconnection resource pooling
connection-poolingthread-safeabandoned

More Python Modules packages