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

Support SQLAlchemy dialect with asyncpg #79

Open
Tracked by #74
amotl opened this issue May 18, 2022 · 1 comment
Open
Tracked by #74

Support SQLAlchemy dialect with asyncpg #79

amotl opened this issue May 18, 2022 · 1 comment

Comments

@amotl
Copy link
Member

amotl commented May 18, 2022

Hi there,

after closing #100 and bringing in crate/crate-python#391, we may want to look at SQLAlchemy support for Python asyncio. Currently, trying to invoke the CrateDB driver like postgresql+asyncpg:// croaks like

>>> from sqlalchemy.ext.asyncio import create_async_engine
>>> create_async_engine("crate+asyncpg://crate@localhost/test")
sqlalchemy.exc.NoSuchModuleError: Can't load plugin: sqlalchemy.dialects:crate.asyncpg

So, the CrateDB dialect will have to be accompanied by a special asyncio mediation layer, like dialects/postgresql/asyncpg.py.

With kind regards,
Andreas.

@robd003
Copy link

robd003 commented Aug 26, 2022

Couldn't async be implemented with aiohttp so that support for connecting to a cluster instead of a single node would still be available?

Is there a way to connect to Crate from asyncpg so that it will round-robin requests between nodes?

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