connection_pool
thread safe connection pool
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-pooluv
uv add connection-poolpoetry
poetry add connection-poolInstalling 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
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
clickhouse-poolProvides a thread-safe connection pool for…
copyleft · top 5,000 on PyPI
pondpondPond is an object-pooling library that manages…
unclear · top 15,000 on PyPI
psycopg2-poolManages a pool of reusable PostgreSQL…
copyleft · top 15,000 on PyPI
psycopg-poolProvides a connection pool for Psycopg 3,…
copyleft · top 1,000 on PyPI
DBUtilsDBUtils provides pooled, persistent database…
permissive · top 5,000 on PyPI
grpcio-gcpExtends gRPC with connection pooling and…
permissive · top 5,000 on PyPI
httpcore2A minimal, low-level HTTP client library…
permissive · top 1,000 on PyPI
django-db-connection-poolProvides connection pooling for Django database…
permissive · top 15,000 on PyPI
nebula3-pythonA Python client library for connecting to and…
permissive · top 15,000 on PyPI
httpcoreA minimal low-level HTTP client library that…
permissive · top 100 on PyPI