queries
Simplified PostgreSQL client built upon Psycopg2
What it is and what it does
Queries wraps psycopg2 to reduce boilerplate when building PostgreSQL client applications. It provides a session-based API that handles connection pooling internally, URI-based connection configuration, and automatic type support for UUIDs and Unicode. The package also includes a Tornado integration for asynchronous query execution in web applications.
The package was last released on 2021-11-16 and is no longer maintained. While it remains in production/stable status according to its classifiers, the lack of updates means it has not been tested against recent Python or PostgreSQL versions and will not receive bug fixes or security updates.
Use it for:
- Building synchronous PostgreSQL client scripts or applications where connection pooling and URI-based configuration reduce setup code.
- Integrating PostgreSQL queries into Tornado web applications using the TornadoSession class for asynchronous database access.
- Maintaining legacy applications that already depend on queries and do not require modern Python version support.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Queries is a simplified wrapper around psycopg2 that provides a session-based API for connecting to and querying PostgreSQL databases, with built-in connection pooling and support for both synchronous and asynchronous (Tornado) operations.
No, not for new projects. The package is abandoned (last release 2021-11-16) and will not receive maintenance, security updates, or compatibility fixes. For new PostgreSQL work, use actively maintained alternatives. Only consider it if you are maintaining existing code that already depends on it and cannot migrate.
Install
queries on PyPI
pip
pip install queriesuv
uv add queriespoetry
poetry add queriesInstalling queries
Before you install
Installation friction is high with no runtime dependencies listed. The package has not been maintained since 2021-11-16 and is marked as abandoned, meaning it will not receive updates for modern Python or PostgreSQL versions.
License in practice
Queries is BSD licensed under a permissive license, meaning you can use, modify, and distribute it freely with minimal restrictions, though you must include the license notice.
Quickstart
import queries
with queries.Session('postgresql://user@localhost/dbname') as session:
for row in session.query('SELECT * FROM table_name'):
print(row)
Requires a running PostgreSQL server and psycopg2 (or psycopg2cffi for PyPy) to be installed; the package itself declares no explicit runtime dependencies in its metadata.
Verify before relying
- Whether psycopg2 is an implicit runtime dependency not declared in package metadata
- Current compatibility with Python versions beyond 3.8 given the maintenance gap since 2021-11-16
- Whether connection pooling behavior remains stable under modern PostgreSQL versions
Package facts
| License | BSD (permissive) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | abandoned — 1,732 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 283,931/month — #8,070 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: queries-2.1.1.tar.gz
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
psycopg2-poolManages a pool of reusable PostgreSQL…
copyleft · top 15,000 on PyPI
shillelaghShillelagh lets you query APIs, files,…
permissive · top 5,000 on PyPI
postgresProvides a lightweight abstraction layer over…
permissive · top 15,000 on PyPI
buildpgbuildpg constructs PostgreSQL prepared…
permissive · top 15,000 on PyPI
databasesProvides async database access for PostgreSQL,…
permissive · top 5,000 on PyPI
psycopgPsycopg 3 is a PostgreSQL database adapter for…
copyleft · top 1,000 on PyPI
pgdbWraps PostgreSQL connections to return query…
permissive · top 15,000 on PyPI
psycopg2PostgreSQL database adapter for Python that…
copyleft · top 1,000 on PyPI
django-db-geventpoolProvides a gevent-based connection pool for…
permissive · top 15,000 on PyPI
psycopg-poolProvides a connection pool for Psycopg 3,…
copyleft · top 1,000 on PyPI