3 ms·
In a similar vein, I've mentioned this before, but if you're doing Python stuff, you can use the apsw package (not the one in PyPi, though) to write a VFS layer
by banana_giraffe 5y ago
In a similar vein, I've mentioned this before, but if you're doing Python stuff, you can use the apsw package (not the one in PyPi, though) to write a VFS layer that SQLite will use to read the database.
I've used this for the same basic idea as this article, only letting me store SQLite databases in AWS's S3 that I can access with AWS APIs so they don't need to be public. It works well, though it's absolutely not for every use case, the overhead is considerable.
I even used it once to read SQLite database files in a zip file stored in S3 without having any local storage to use. Not one of my prouder moments, but hey, I coded my way out of the corner someone else designed for me.
- killingtime74 5y agoThis one? https://rogerbinns.github.io/apsw/ https://rogerbinns.github.io/apsw/
- banana_giraffe 5y agoYep, exactly that one. There's a simple example of a VFS implementation on the examples page that's a reasonable starting point: https://rogerbinns.github.io/apsw/example.html https://rogerbinns.github.io/apsw/example.html Once you wrap your head around how you need to pass parameters to the helper, it's really straightforward, you just need to implement the xOpen and xRead calls.
- killingtime74 5y agoThank you!