Trio interface to sqlite

Does anyone know of a way to use sqlite in python with Trio (asynchronously, of course)? I’m looking at something like this:, but with support for Trio.


We discussed this quickly in chat when you posted that question to Stack Overflow: python-trio/general - Gitter. There is no library with native Trio support, so here are your options:


  • Use the sqlite3 standard library with threads
  • Not mentioned, but trio-asyncio could let you use aiosqlite from Trio


Hope that helps!