{"id":21146,"library":"django-db-geventpool","title":"django-db-geventpool","description":"Provides a DB connection pool using gevent for Django, allowing concurrent database access in a gevent-ready manner. Current version 4.0.8, supports Django >= 4.2 and psycopg2/psycopg3. Release cadence is irregular.","status":"active","version":"4.0.8","language":"python","source_language":"en","source_url":"https://github.com/jneight/django-db-geventpool","tags":["django","gevent","connection-pool","postgresql","async"],"install":[{"cmd":"pip install django-db-geventpool","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Core dependency for pool and monkey-patching","package":"gevent","optional":false},{"reason":"Framework integration","package":"django","optional":false},{"reason":"Default PostgreSQL driver","package":"psycopg2-binary","optional":true},{"reason":"Alternative PostgreSQL driver","package":"psycopg2","optional":true},{"reason":"PostgreSQL driver (psycopg3), supported from v4.0.3","package":"psycopg","optional":true}],"imports":[{"wrong":"from django_db_geventpool.backends.postgresql import DatabaseWrapper","symbol":"DatabaseWrapper","correct":"from django_db_geventpool import DatabaseWrapper"}],"quickstart":{"code":"import os\nos.environ.setdefault('DJANGO_SETTINGS_MODULE', 'myproject.settings')\nimport django\ndjango.setup()\n\nfrom django.db import connection\ncursor = connection.cursor()\ncursor.execute(\"SELECT 1\")\nprint(cursor.fetchone())\n# Ensure gevent is patched early; use gevent.monkey.patch_all() before importing django","lang":"python","description":"Basic usage: monkey-patch gevent early, then use Django ORM normally. Pool is automatically used if DATABASES configuration includes OPTIONS with pool settings."},"warnings":[{"fix":"Upgrade Django to >=4.2, and use django-db-geventpool >=4.0.8.","message":"Version 4.0.0 dropped support for Django < 3.1. Version 4.0.8 drops support for Django < 4.2. Upgrade your Django version if you're on an older release.","severity":"breaking","affected_versions":"<=4.0.0"},{"fix":"Place 'import gevent.monkey; gevent.monkey.patch_all()' as the very first lines of your application entry point (e.g., wsgi.py, manage.py).","message":"You must call gevent.monkey.patch_all() before importing any Django modules, including settings. Otherwise, database connections will not be patched and may deadlock.","severity":"gotcha","affected_versions":"all"},{"fix":"Use ENGINE as shown in the docs and set 'OPTIONS': {'psycopg3': True} in your DATABASES config.","message":"When using psycopg3 (psycopg package), ensure you set 'ENGINE': 'django_db_geventpool.backends.postgresql_psycopg2' even if using psycopg3. The pool backend is the same; psycopg3 support is enabled via the driver setting.","severity":"gotcha","affected_versions":">=4.0.3"},{"fix":"Configure DATABASES as documented, e.g. 'ENGINE': 'django_db_geventpool.backends.postgresql_psycopg2'.","message":"Direct import of backends from django_db_geventpool is deprecated. Use Django's default engine paths with custom OPTIONS instead.","severity":"deprecated","affected_versions":">=4.0"}],"env_vars":null,"search_vec":"'4.0.8':26 '4.2':29 'access':17 'allow':14 'async':42 'cadenc':33 'concurr':15 'connect':8,39 'connection-pool':38 'current':24 'databas':16 'db':3,7 'django':2,13,28,36 'django-db-geventpool':1 'gevent':11,21,37 'gevent-readi':20 'geventpool':4 'irregular':35 'manner':23 'pool':9,40 'postgresql':41 'provid':5 'psycopg2/psycopg3':31 'readi':22 'releas':32 'support':27 'use':10 'version':25","created_at":"2026-04-27T16:58:20.138705+00:00","updated_at":"2026-04-27T16:58:20.138705+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\nImportError: cannot import name 'DatabaseWrapper' from 'django_db_geventpool' (/tmp/tmphihx7csi/venv/lib/python3.12/site-packages/django_db_geventpool/__init__.py)"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"4.0.8","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/jneight/django-db-geventpool","docs":null,"changelog":null,"pypi":"https://pypi.org/project/django-db-geventpool/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["database","web-framework"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"import_fail","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-07-10","install_tag":null}}