{"categories":[{"label":"Database","url":"https://skillfed.io/packages/category/database/2"}],"enrichment":{"capability":"Integrates psycopg2 with coroutine libraries (eventlet, gevent) by registering wait callbacks that allow asynchronous database operations within a blocking interface.","skillfed_tags":["async-integration","coroutine-support","legacy-maintained"],"use_cases":["Run concurrent PostgreSQL queries in a gevent-based web application without blocking other greenlets.","Integrate psycopg2 into an eventlet application that needs non-blocking database access alongside other async I/O.","Avoid Eventlet's default monkeypatching by explicitly registering psycogreen's wait callback for finer control.","Enable uWSGI green thread applications to execute asynchronous database operations within the async platform."],"what_it_does":"psycogreen provides wait callbacks that hook psycopg2 into coroutine event loops, enabling non-blocking database queries within gevent and eventlet applications. It works by registering callbacks with psycopg2's extension API so that when a database operation would block, control returns to the event loop instead of freezing the thread.\n\nThe package offers two main modules: psycogreen.gevent for gevent integration and psycogreen.eventlet for eventlet integration. Each exposes a patch_psycopg() function and a corresponding wait callback. It is designed for applications that already use gevent or eventlet for concurrency and need their PostgreSQL queries to cooperate with that event loop rather than blocking.","worth_installing":"Yes, if you are already committed to gevent or eventlet and need psycopg2 to cooperate with that event loop. No, if you are starting a new project\u2014modern alternatives like asyncpg or psycopg3 with native async support are better choices. Caution: dormant maintenance (last release 2020) and source-only distribution mean you accept integration risk and potential compatibility issues with recent Python or psycopg2 versions."},"id":"psycogreen","links":{"html":"https://skillfed.io/packages/psycogreen","md":"https://skillfed.io/packages/psycogreen.md","pypi":"https://pypi.org/project/psycogreen/"},"maintenance":{"status":"dormant"},"meta":{"latest_release":"2020-02-22","license_spdx":null,"license_treatment":"permissive","name":"psycogreen","python_support":"unspecified","summary":"psycopg2 integration with coroutine libraries"},"popularity":{"monthly_downloads":1025661,"position":4480,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"1.0.2"}
