
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.
psycopg2-query-builder
Advanced tools
Sql/Postgresql query builder, inspired by the Supabase client SDK functions.
QueryBuilder is a lightweight Python package designed to simplify building SQL queries when using the Psycopg2 library to interact with PostgreSQL databases. Inspired by Supabase's client SDKs, QueryBuilder aims to provide an intuitive and fluid API for constructing and executing SQL queries.
SELECT statements with conditional filters.You can install QueryBuilder using pip:
pip install psycopg2-query-builder
Here's a quick example of how to use the QueryBuilder in your project:
from internal.database.db import QueryBuilder
from dotenv import dotenv_values
import psycopg2
# Load environment variables
env_config = dotenv_values(".env")
# Establish a database connection
database_connection = psycopg2.connect(
database=env_config.get("DB_NAME"),
host=env_config.get("DB_HOST"),
user=env_config.get("DB_USER"),
password=env_config.get("DB_PASSWORD"),
port=env_config.get("DB_PORT"),
)
# Function to get a database cursor
db_curser = database_connection.cursor()
# Create a QueryBuilder instance
query = QueryBuilder(db_curser)
# Build and execute a query
res = (
query.select("*")
.equal("id", "uuid")
.equal("email", "test@gmail.com")
.execute()
)
# Print the result
print(res)
res = (
query.select(["id", "email", "hashed_password"])
.equal("id", "uuid")
.execute()
)
print(res)
_cursor() function returns a new database cursor, which is passed to the QueryBuilder.select() method specifies the columns to be retrieved (* means all columns), and
the table() method specifies the table to query (users).execute() method runs the query and returns the results as a list of dictionaries.This project is licensed under the MIT License.
FAQs
Sql/Postgresql query builder, inspired by the Supabase client SDK functions.
We found that psycopg2-query-builder demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.