Skip to content

Async queries #6562

Answered by jcrist
Wouittone asked this question in Q&A
Discussion options

You must be logged in to vote

Ibis currently doesn't expose any async-specific functionality, and my current feeling is that any async-specific functionality would be out of scope for this project.

If you wanted to use ibis with asyncio (or another async framework), you could wrap the ibis execution in a thread using something like asyncio.run_in_executor (https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.run_in_executor). This would avoid blocking the event loop, but wouldn't play well with cancellation.

Alternatively, you could use ibis only for expression -> sql operations, then make use of some other async DB library to handle the actual execution (e.g. https://github.com/MagicStack/asyncpg for…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Wouittone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants