trinodb / trino-python-client

Python client for Trino
Apache License 2.0
307 stars 151 forks source link

Feature request: SQLAlchemy async #408

Open hongbo-miao opened 9 months ago

hongbo-miao commented 9 months ago

Describe the feature

It would be great to provide a SQLAlchemy async demo, thanks!

SQLAlchemy says it supports async since version 1.4

This repo readme says

trino.sqlalchemy is compatible with the latest 1.3.x and 1.4.x SQLAlchemy versions at the time of release of a particular version of the client.

https://docs.sqlalchemy.org/en/20/orm/extensions/asyncio.html

However, I cannot make them work.

I guess for SQLAlchemy, I need install

pip install sqlalchemy[asyncio]

This repo I need run

pip install trino[sqlalchemy]

Apparently, this does not exist 🥲

pip install trino[sqlalchemy[asyncio]]

I guess it may be blocked by this https://github.com/trinodb/trino-python-client/issues/3 (?)

Describe alternatives you've considered

Use https://github.com/mvanderlee/aiotrino instead. However, it would be great to support async officially including SQLAlchemy async. Thanks!

Are you willing to submit PR?

hovaesco commented 9 months ago

Async SQLAlchemy is not supported currently for trino-python-client.

hongbo-miao commented 9 months ago

Thanks @hovaesco for clarification! I guess it would be a feature request. Just updated the title. Hopefully one day can support. 😃