Registry / database / sqlalchemy-pgspider

sqlalchemy-pgspider

JSON →
library0.1.0pypypiunverified

SQLAlchemy-PGSpider is a Python library that provides a dialect for SQLAlchemy, enabling it to connect to PGSpider databases. As of version 0.1.0, it offers fundamental connectivity and query execution. It is a new project in active development, likely following a release cadence tied to upstream PGSpider and SQLAlchemy updates.

pip install sqlalchemy-pgspider
INSTALL
IMPORT
SIG · SQLALCHEMY-PGSPIDE
S
sqlalchemy-pgspider
databasepythonv0.1.0
Install
1.6s avg
Import
—
Disk
74MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v0.1.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 77.4MB
glibc
py 3.10–3.920 runs
installs and imports cleanly · install 1.6s · import 0.000s · 18MB
74MB installed
● package 74MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

create_engine
✓ from sqlalchemy import create_engine
✗ from sqlalchemy_pgspider import create_engine

This quickstart demonstrates how to establish a connection to a PGSpider database using `create_engine` with the 'pgspider://' URI and execute a simple query. Ensure you have the `PGSPIDER_CONN_STR` environment variable set or update the placeholder directly.

from sqlalchemy import create_engine, text import os # Replace with your PGSpider connection details # For example: "pgspider://user:password@host:port/database" PGSPIDER_CONN_STR = os.environ.get('PGSPIDER_CONN_STR', 'pgspider://postgres:password@localhost:5432/pgspider_db') try: engine = create_engine(PGSPIDER_CONN_STR) with engine.connect() as connection: result = connection.execute(text("SELECT 1")) print(f"PGSpider connection successful. Result: {result.scalar()}") except Exception as e: print(f"Error connecting to PGSpider: {e}")
Debug
Known issues
gotchaA separate PostgreSQL database driver (e.g., `psycopg2-binary` or `psycopg`) must be installed for `sqlalchemy-pgspider` to function correctly, as PGSpider is PostgreSQL-compatible. The dialect registers itself, but the underlying driver handles the actual network communication.
fix
Install a suitable driver: `pip install psycopg2-binary` or `pip install psycopg`.
affects: 0.1.0 and later
gotchaAs a 0.1.0 release, `sqlalchemy-pgspider` is in its early stages. This means that advanced SQLAlchemy features (e.g., specific ORM capabilities, complex schema reflection) or unique PGSpider features might have limited or no direct support, requiring raw SQL.
fix
Review the official GitHub repository for updates on feature support. For unsupported features, consider using `connection.execute(text(...))` for raw SQL queries.
affects: 0.1.0
gotchaThe `pgspider://` connection string must be precisely configured to match your PGSpider server's host, port, database name, username, and password. Incorrect parameters are a common source of `OperationalError`.
fix
Double-check all components of your `pgspider://user:password@host:port/database` URI against your PGSpider server's configuration and ensure the server is running and accessible.
affects: 0.1.0 and later
Upgrade
Version history
0.1.0latest on PyPI · released Jun 6, 2023
Audit
Dependencies
SQLAlchemyrequiredCore dependency for any SQLAlchemy dialect.
psycopg2-binaryoptionalA PostgreSQL driver is required for SQLAlchemy to establish a connection to a PGSpider database. 'psycopg2-binary' is a common choice for simplicity.
Agent activity
23 hits · last 30 days
node
20
OpenAI (training)
1
Resources
sqlalchemy-pgspider — pip install sqlalchemy-pgspider · libregistry