django-db-geventpool
Add a DB connection pool using gevent to django
Decision gist · record as of 2026-08-14
Yes, if you are running Django with gevent workers and need connection pooling. The low install friction and permissive Apache-2.0 license make it a straightforward addition. However, the aging maintenance status (537 days since last activity) and the fact that Django 5.1+ now has native pool support mean you should verify compatibility with your specific Django and database driver version before committing to production use.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires gevent or eventlet to be installed separately.
- For Django 5.1+, native pool support must be disabled by setting 'pool': False in OPTIONS.
- Low friction to install; depends only on django.
License · maintenance · safety
Apache-2.0 (permissive) — Licensed under Apache-2.0 (permissive), so you can use it freely in commercial and private projects without copyleft obligations.
last release 2025-02-23 (537 days) · last repo commit 2025-06-01 · 189 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 90,253 downloads/mo, #13,607 on PyPI
Alternatives
Verify before relying
# Install
pip install django-db-geventpool
# In Django settings.py, configure the pooled backend:
DATABASES = {
'default': {
'ENGINE': 'django_db_geventpool.backends.postgresql_psycopg3',
'NAME': 'mydb',
'USER': 'postgres',
'PASSWORD': 'password',
'HOST': 'localhost',
'CONN_MAX_AGE': 0,
'OPTIONS': {
'MAX_CONNS': 20,
'REUSE_CONNS': 10
}
}
}- Whether the package works reliably with Django 5.1+ given the native pool support changes mentioned in the description.
- Current compatibility status with modern psycopg3 versions and whether additional patching is still necessary.
- Whether the aging maintenance status reflects active use or declining adoption in the Django ecosystem.
- What external dependencies (gevent, eventlet, or driver-specific patches) must be installed separately.
What it is and what it does
django-db-geventpool adds a connection pooling layer to Django's PostgreSQL backend using gevent or eventlet. Instead of opening a new database connection for each request, it maintains a pool of reusable connections, reducing the overhead of connection setup and teardown in high-concurrency environments.
The package works by replacing Django's default database backend with a pooled variant. You configure it in Django settings by specifying the pool engine, setting maximum connections (default 4), and optionally the number of connections to reuse across requests. The package includes a decorator utility to clean up connections when using greenlets outside the normal request cycle (e.g., in Celery tasks).
Use it for
- Running Django under a gevent-based application server to reduce database connection churn in high-request-rate scenarios.
- Using Django with task queues that spawn greenlets, where manual connection cleanup is needed to avoid connection leaks.
- Deploying Django applications on systems with strict connection limits where connection pooling significantly improves throughput.
- Switching between psycopg2 and psycopg3 backends while maintaining gevent compatibility.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are running Django with gevent workers and need connection pooling.
The low install friction and permissive Apache-2.0 license make it a straightforward addition. However, the aging maintenance status (537 days since last activity) and the fact that Django 5.1+ now has native pool support mean you should verify compatibility with your specific Django and database driver version before committing to production use.
Install
django-db-geventpool on PyPI
Before you install
Low friction to install; depends only on django. Maintenance status is aging—last release was 2025-02-23 but no activity for 537 days prior, and the repository shows 189 stars with no indication of active development.
Requires gevent or eventlet to be installed separately. For Django 5.1+, native pool support must be disabled by setting 'pool': False in OPTIONS.
License in practice
Licensed under Apache-2.0 (permissive), so you can use it freely in commercial and private projects without copyleft obligations.
Quickstart
# Install
pip install django-db-geventpool
# In Django settings.py, configure the pooled backend:
DATABASES = {
'default': {
'ENGINE': 'django_db_geventpool.backends.postgresql_psycopg3',
'NAME': 'mydb',
'USER': 'postgres',
'PASSWORD': 'password',
'HOST': 'localhost',
'CONN_MAX_AGE': 0,
'OPTIONS': {
'MAX_CONNS': 20,
'REUSE_CONNS': 10
}
}
}
Verify before relying
- Whether the package works reliably with Django 5.1+ given the native pool support changes mentioned in the description.
- Current compatibility status with modern psycopg3 versions and whether additional patching is still necessary.
- Whether the aging maintenance status reflects active use or declining adoption in the Django ecosystem.
- What external dependencies (gevent, eventlet, or driver-specific patches) must be installed separately.
Package facts
| License | Apache-2.0 permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagedjango |
| Maintenance | Aging 537 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 90,253 / month, #13,607 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Environment :: Web EnvironmentFramework :: DjangoFramework :: Django :: 3.2Framework :: Django :: 4.2Framework :: Django :: 5.0Intended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Topic :: Software Development :: Libraries :: Application Frameworks |
Evidence: django_db_geventpool-4.0.8-py2.py3-none-any.whl
Tags
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 › “django postgresql connection pool”
- django-db-geventpoolProvides a gevent-based connection pool for Django's PostgreSQL…
- django-db-connection-poolProvides connection pooling for Django database backends (MySQL,…
- psycopg-poolProvides a connection pool for Psycopg 3, managing reusable…
Give your agent the search over MCP, or paste the wish link into any chat.
More Application Frameworks packages
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Textual is a Python framework for building cross-platform user interfaces that run in the terminal or web browser using a modern, component-based API.
Install it if you're developing CLI tools, dashboards, or interactive terminal applications.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Build and connect to Model Context Protocol servers that expose tools, resources, and prompts to LLM applications over stdio, HTTP, or SSE transports.
Install it if you need to build or connect to servers.
Werkzeug is a WSGI utility library providing request/response objects, URL routing, an interactive debugger, HTTP utilities, and a development server for building web applications.
See also psycogreen · psycopg-pool · dj-database-url · psycopg2-pool · geventhttpclient · django-db-connection-pool · gevent · psycopg · postgres · watchdog-gevent