$npx skillfedfor your agent

google-cloud-sqlcommenter

Augment SQL statements with meta information about frameworks and the running environment.

SkipPyPI UtilitiesReleased Aug 2021534.3K downloads / moBSDPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — google_cloud_sqlcommenter-2.0.0-py3-none-any.whl
v2.0.0 · released 2021-08-18

No. The package is abandoned (last release 2021-08-18) and will not receive updates for compatibility with modern framework versions or security issues. While the core concept is sound and the BSD license is permissive, the lack of maintenance makes it a liability for new projects. Consider alternatives that are actively maintained.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Installation is straightforward with no runtime dependencies for the base package.
  • However, the project is abandoned—last release was 2021-08-18, over 1822 days ago—so no maintenance or security updates are expected.

License · maintenance · safety

BSD (permissive) — BSD license is permissive, allowing commercial use, modification, and distribution with minimal restrictions. No licensing barrier to adoption.

last release 2021-08-18 (1822 days)

0 known vulnerabilities (OSV.dev, 2026-08-14) · 534,275 downloads/mo, #6,136 on PyPI

Verify before relying

# Django
pip install google-cloud-sqlcommenter

# Add to settings.py MIDDLEWARE:
MIDDLEWARE = [
    'google.cloud.sqlcommenter.django.middleware.SqlCommenter',
]

# SQLAlchemy
from google.cloud.sqlcommenter.sqlalchemy.executor import BeforeExecuteFactory
listener = BeforeExecuteFactory(with_db_driver=True)
sqlalchemy.event.listen(engine, 'before_cursor_execute', listener, retval=True)

# Psycopg2
from google.cloud.sqlcommenter.psycopg2.extension import CommenterCursorFactory
cursor_factory = CommenterCursorFactory(with_db_driver=True)
conn = psycopg2.connect(..., cursor_factory=cursor_factory)
  • Whether the package works correctly with modern versions of Django, SQLAlchemy, or Psycopg2 released after 2021-08-18
  • Whether OpenCensus and OpenTelemetry optional dependencies are still compatible with current versions
  • Whether the package is maintained under a different repository or organization
Same gist for agents: .md · .json

What it is and what it does

sqlcommenter is a set of middleware and cursor factories that automatically append SQL comments containing metadata to database queries. It works by intercepting queries at the ORM or driver level—Django middleware, SQLAlchemy event listeners, or Psycopg2 cursor factories—and injecting structured comments that capture framework version, HTTP route, controller/endpoint name, and optionally distributed trace context via OpenCensus or OpenTelemetry. The comments appear in database logs, making it easier to correlate slow queries or errors back to the application code that triggered them.

The package supports Django, SQLAlchemy, and Psycopg2 with configurable options for which metadata to include. It has no runtime dependencies for basic use, though OpenCensus and OpenTelemetry can be installed as optional extras. However, the project is abandoned—the last release was 2021-08-18—so it will not receive updates for compatibility with newer framework versions or security fixes.

Use it for

  • Add framework and route metadata to SQL logs in Django applications to correlate slow queries with specific views
  • Inject trace IDs into SQLAlchemy queries for distributed tracing across microservices
  • Embed driver and connection pool info in Psycopg2 logs to debug database connection issues
  • Capture OpenTelemetry trace context in SQL comments for end-to-end request tracing
  • Augment database audit logs with application context without modifying query code

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Skip

No.

The package is abandoned (last release 2021-08-18) and will not receive updates for compatibility with modern framework versions or security issues. While the core concept is sound and the BSD license is permissive, the lack of maintenance makes it a liability for new projects. Consider alternatives that are actively maintained.

Install

google-cloud-sqlcommenter on PyPI

Before you install

Installation is straightforward with no runtime dependencies for the base package. However, the project is abandoned—last release was 2021-08-18, over 1822 days ago—so no maintenance or security updates are expected.

License in practice

BSD license is permissive, allowing commercial use, modification, and distribution with minimal restrictions. No licensing barrier to adoption.

Quickstart

# Django
pip install google-cloud-sqlcommenter

# Add to settings.py MIDDLEWARE:
MIDDLEWARE = [
    'google.cloud.sqlcommenter.django.middleware.SqlCommenter',
]

# SQLAlchemy
from google.cloud.sqlcommenter.sqlalchemy.executor import BeforeExecuteFactory
listener = BeforeExecuteFactory(with_db_driver=True)
sqlalchemy.event.listen(engine, 'before_cursor_execute', listener, retval=True)

# Psycopg2
from google.cloud.sqlcommenter.psycopg2.extension import CommenterCursorFactory
cursor_factory = CommenterCursorFactory(with_db_driver=True)
conn = psycopg2.connect(..., cursor_factory=cursor_factory)

Verify before relying

  • Whether the package works correctly with modern versions of Django, SQLAlchemy, or Psycopg2 released after 2021-08-18
  • Whether OpenCensus and OpenTelemetry optional dependencies are still compatible with current versions
  • Whether the package is maintained under a different repository or organization

Package facts

LicenseBSD permissive
Python supportNot specified
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceAbandoned 1,822 days since the last release
First released
Downloads534,275 / month, #6,136 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 4 - BetaEnvironment :: Web EnvironmentFramework :: DjangoFramework :: Django :: 2.1Framework :: Django :: 2.2Intended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Utilities

Evidence: google_cloud_sqlcommenter-2.0.0-py3-none-any.whl

Tags

Capabilities
sql query annotationdjango sqlalchemy psycopg2 middlewaresql comment injectiondatabase query metadatatrace context sql loggingframework-aware sql commentsquery instrumentation
Topics
sql-instrumentationobservabilityabandoned

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “sql query annotation”

  • google-cloud-sqlcommenterAutomatically injects metadata comments into SQL queries executed…
  • django-sql-utilsProvides simplified APIs for Django querysets to generate optimized…
  • mygeneMygene is a Python wrapper for the MyGene.Info REST API that…

Give your agent the search over MCP, or paste the wish link into any chat.

More Utilities packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
charset-normalizer Worth it
PyPI · Utilities · released Aug 2026

Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.

permissive licensepure Python · 3.7+
1.7Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
pluggy Worth it
PyPI · Libraries · released May 2025

Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.

Install it if you're building an extensible application or framework.

MITpure Python · 3.9+aging
1.3Bdownloads / mo
Pygments Worth it
PyPI · Utilities · released Mar 2026

Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.

Install it if you need to display or transform source code.

BSD-2-Clausepure Python · 3.9+
1.3Bdownloads / mo
six With conditions
PyPI · Libraries · released Dec 2024

Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.

MITpure Python
1.2Bdownloads / mo

See also opentelemetry-instrumentation-psycopg2 · django-contrib-comments · opentelemetry-instrumentation-psycopg · opentelemetry-instrumentation-sqlalchemy · sqlalchemy-cockroachdb · sqltap · sqlalchemy-mixins · sqlalchemy-pgspider · opentelemetry-instrumentation-pymysql · sqlbag