Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing Support for SQLAlchemy Dialect in PSQLPy #120

Open
dmastapkovich opened this issue Jan 15, 2025 · 1 comment
Open

Missing Support for SQLAlchemy Dialect in PSQLPy #120

dmastapkovich opened this issue Jan 15, 2025 · 1 comment

Comments

@dmastapkovich
Copy link

Problem

Currently, PSQLPy lacks a dedicated SQLAlchemy dialect, making it impossible to use PSQLPy as a backend with SQLAlchemy for seamless database interactions. This is a significant limitation for users who rely on SQLAlchemy's ORM and query-building capabilities alongside PSQLPy's performance and type safety benefits.

Expected Behavior

A new SQLAlchemy dialect should be implemented to allow PSQLPy to work as a backend for SQLAlchemy, supporting asynchronous connections and utilizing PSQLPy's unique features such as:

  • Native support for prepared statements.
  • Efficient handling of PostgreSQL data types like json, jsonb, and interval.
  • Compatibility with create_async_engine and SQLAlchemy's connection abstractions.

Example Usage

from sqlalchemy.ext.asyncio import create_async_engine

engine = create_async_engine(
    "postgresql+psqlpy://user:password@host:port/database",
    pool_size=10,
    echo=True
)

References

@chandr-andr
Copy link
Member

@dmastapkovich Awesome idea!

If you can start researching it, it would be awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants