{"categories":[{"label":"Database","url":"https://skillfed.io/packages/category/database/3"}],"enrichment":{"capability":"Manages a pool of reusable PostgreSQL connections via psycopg2, reducing connection overhead in multi-threaded applications.","skillfed_tags":["connection-pooling","postgresql","concurrency"],"use_cases":["Web applications serving concurrent requests that each need a database connection.","Multi-threaded batch processing jobs that query PostgreSQL repeatedly and need to avoid connection exhaustion.","Long-running services that spawn worker threads and need a shared, thread-safe pool of database connections.","Testing frameworks that run parallel test suites against a shared PostgreSQL database.","Applications requiring reduced connection setup latency in high-concurrency scenarios."],"what_it_does":"psycopg2-pool wraps psycopg2 to provide thread-safe connection pooling for PostgreSQL. Instead of opening and closing a new database connection for each request\u2014an expensive operation\u2014the pool maintains a set of open connections that applications can borrow and return, reducing latency and resource consumption in concurrent workloads.\n\nThe package exports a ThreadSafeConnectionPool class that manages a minimum and maximum number of connections, handing them out on demand and recycling them back into the pool. It is designed for multi-threaded Python applications that make frequent database queries and need to amortize connection setup costs. The library depends only on psycopg2-binary and installs as a pure Python wheel.","worth_installing":"Yes, if you are building a multi-threaded Python application that queries PostgreSQL frequently. The package is simple, has low install friction, carries no known vulnerabilities, and solves a real problem. The dormant maintenance status is a minor concern\u2014monitor for breaking changes in psycopg2 or PostgreSQL\u2014but the code is stable. Be aware of the LGPL3 copyleft license if your application is proprietary."},"id":"psycopg2-pool","links":{"html":"https://skillfed.io/packages/psycopg2-pool","md":"https://skillfed.io/packages/psycopg2-pool.md","pypi":"https://pypi.org/project/psycopg2-pool/"},"maintenance":{"status":"dormant"},"meta":{"latest_release":"2024-01-15","license_spdx":null,"license_treatment":"copyleft","name":"psycopg2-pool","python_support":"supports_current","summary":"Proper pooling of psycopg2 connections"},"popularity":{"monthly_downloads":311370,"position":7735,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"1.2"}
