I know that there exists a package called aiopg for working with Postgresql in asyncio-friendly connections. Is there a similar version/package for Presto? I'm trying to implement concurrency for querying in Presto connections in Python.
Thanks in advance!
Presto Python API does not provide
asynciointegration, so you need to treat it as any other blocking IO inasyncioworld.I am not familiar with
asyncio, butrun_in_executorlooks like the way to do this.Since you're not running thousands of concurrent queries (which wouldn't make sense in Presto anyway), this isn't going to hurt performance of your application.
I recommend that you also create a feature request in https://github.com/prestosql/python-client/issues/new (this is a new repo, so you can get very low, cool issue number).