You can use the memvfs module to load in-memory databases if you're using the C API. I'm not sure how many higher-level APIs support it though.
[1] https://stackoverflow.com/a/53453338/3063 [2] https://www.sqlite.org/loadext.html#example_extensions [3] https://www.sqlite.org/src/file/ext/misc/memvfs.c