$npx skillfedfor your agent

pgspecial

Meta-commands handler for Postgres Database.

With conditionsPyPI Front-EndsReleased Apr 2025650.5K downloads / moBSDPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — pgspecial-2.2.1-py3-none-any.whl
v2.2.1 · released 2025-04-28 · Python >=3.9 · 3 runtime deps: click, sqlparse, psycopg

Yes, if you need to execute PostgreSQL meta-commands programmatically. The library is stable, has low install friction, carries a permissive license, and is actively used by established projects. The 473-day release gap is a minor concern for a mature, narrow-scope package, but verify compatibility with your PostgreSQL and psycopg versions before production use.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python >=3.9 and an active psycopg database connection.
  • Low friction installation with three lightweight runtime dependencies.
  • Maintenance status is aging—last release was 473 days ago—but the package remains in use by established projects.

License · maintenance · safety

BSD (permissive) — BSD permissive license allows use in commercial and proprietary projects with minimal restrictions, requiring only license attribution.

last release 2025-04-28 (473 days)

0 known vulnerabilities (OSV.dev, 2026-08-14) · 650,487 downloads/mo, #5,561 on PyPI

Verify before relying

pip install pgspecial

from pgspecial.main import PGSpecial

pgspecial = PGSpecial()
for result in pgspecial.execute(cur, sql):
    print(result)
  • Whether the 473-day gap since last release reflects stable maturity or abandonment risk for future PostgreSQL compatibility.
  • Current state of the repository (archived status, recent commits) to assess ongoing maintenance.
  • Compatibility with current versions of psycopg and PostgreSQL.
Same gist for agents: .md · .json

What it is and what it does

pgspecial is a Python library that wraps PostgreSQL's meta-commands—the backslash commands you'd normally type in psql—into a callable API. It lets you execute commands programmatically against a live database connection, returning structured results you can process in code.

The library is designed for tools that need to expose PostgreSQL introspection and administration commands without reimplementing them. It depends on click, sqlparse, and psycopg for the database connection itself. You instantiate PGSpecial, pass it a cursor and a command string, and iterate over the results. It also supports loading named queries from config files via the NamedQueries class.

Use it for

  • Building a PostgreSQL REPL or interactive shell that supports backslash commands.
  • Adding database introspection to a Jupyter notebook or IPython environment.
  • Implementing a web-based database management tool that needs to expose PostgreSQL admin commands.
  • Automating database inspection tasks in scripts without reimplementing meta-command logic.

Worth the install?

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

With conditions

Yes, if you need to execute PostgreSQL meta-commands programmatically.

The library is stable, has low install friction, carries a permissive license, and is actively used by established projects. The 473-day release gap is a minor concern for a mature, narrow-scope package, but verify compatibility with your PostgreSQL and psycopg versions before production use.

Install

pgspecial on PyPI

Before you install

Low friction installation with three lightweight runtime dependencies. Maintenance status is aging—last release was 473 days ago—but the package remains in use by established projects.

Requires Python >=3.9 and an active psycopg database connection.

License in practice

BSD permissive license allows use in commercial and proprietary projects with minimal restrictions, requiring only license attribution.

Quickstart

pip install pgspecial

from pgspecial.main import PGSpecial

pgspecial = PGSpecial()
for result in pgspecial.execute(cur, sql):
    print(result)

Verify before relying

  • Whether the 473-day gap since last release reflects stable maturity or abandonment risk for future PostgreSQL compatibility.
  • Current state of the repository (archived status, recent commits) to assess ongoing maintenance.
  • Compatibility with current versions of psycopg and PostgreSQL.

Package facts

LicenseBSD permissive
Python supportSupports the current Python release >=3.9
Install frictionLow. Pure-Python wheel
Runtime dependencies
3 packages
clicksqlparsepsycopg
MaintenanceAging 473 days since the last release
First released
Downloads650,487 / month, #5,561 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14

Evidence: pgspecial-2.2.1-py3-none-any.whl

Tags

Capabilities
postgres meta-commandspostgresql backslash commandspostgres special commands apipgspecial postgresdatabase introspectionpostgres repl commands
Topics
postgres-clidatabase-introspection
PyPI keywords
postgresdatabaseclimeta-commands

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 › “postgres meta-commands”

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

More Front-Ends packages

SQLAlchemy Worth it
PyPI · Front-Ends · released Aug 2026

SQLAlchemy is a Python SQL toolkit and Object Relational Mapper (ORM) that provides both a high-level ORM layer for declarative object persistence and a Core SQL construction system for direct database abstraction and query building.

permissive licensepure Python · 3.7+
422.7Mdownloads / mo
psycopg2-binary Worth it
PyPI · Software Development · released Apr 2026

psycopg2-binary is a PostgreSQL database adapter for Python that implements the DB API 2.0 specification, enabling Python applications to connect to and query PostgreSQL databases with thread-safe concurrent operations.

copyleftcompiled wheel · 3.9+
271.6Mdownloads / mo
alembic Worth it
PyPI · Front-Ends · released Aug 2026

Alembic generates and manages database schema migrations for SQLAlchemy applications, handling version control of database structure changes with support for upgrades, downgrades, and auto-generation from model changes.

Install it if you use SQLAlchemy and need to version-control schema changes; skip it only if you manage migrations manually or use a different ORM entirely.

MITpure Python · 3.10+
215.2Mdownloads / mo
weaviate-client Worth it
PyPI · Front-Ends · released Aug 2026

A Python client library for connecting to and querying Weaviate, a vector database that enables semantic search and AI-powered data retrieval.

permissive licensepure Python · 3.10+
213.2Mdownloads / mo
databricks-sql-connector Worth it
PyPI · Front-Ends · released Jul 2026

A Python client library that connects to Databricks clusters and SQL warehouses using a Thrift-based protocol, conforming to the Python DB API 2.0 specification and supporting Arrow-based data exchange.

Install it if you need to query Databricks clusters or SQL warehouses from Python.

Apache-2.0pure Python
119.5Mdownloads / mo
psycopg Worth it
PyPI · Software Development · released May 2026

Psycopg 3 is a PostgreSQL database adapter for Python that enables applications to connect to, query, and manage PostgreSQL databases using Python code.

Install it if you need to connect Python to PostgreSQL.

LGPL-3.0-onlypure Python · 3.10+
117.0Mdownloads / mo

See also pgcli · pgdb · jupysql · pgsanity · postgres · litecli · psycopg2 · sqlalchemy-pgspider · PyPgConfig · testing.postgresql