-
For a project I'm working on I'd like to use sqlite-regex with Tortoise, but I couldn't find anything in the docs about loading extensions. I tried getting the underlying connection from tortoise and loading the extension using that, but that also seemed like a dead end. Is there a way to do this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Figured this out: Getting the underlying aiosqlite connection from tortoise seemed like a dead end because on macos sqlite, and therefore python, is compiled without sqlite extension loading support out of the box. After installing sqlite from brew and building python with sqlite extension loading support everything works as expected. https://til.simonwillison.net/sqlite/trying-macos-extensions |
Beta Was this translation helpful? Give feedback.
Figured this out:
Getting the underlying aiosqlite connection from tortoise seemed like a dead end because on macos sqlite, and therefore python, is compiled without sqlite extension loading support out of the box.
After installing sqlite from brew and building python with sqlite extension loading support everything works as expected.
https://til.simonwillison.net/sqlite/trying-macos-extensions
https://til.simonwillison.net/sqlite/sqlite-extensions-python-macos
pyenv/pyenv#1702 (comment)