c2 = sqlite3.connect('file::memory:?cache=shared')
c3 = sqlite3.connect('/tmp/sqlite3.db')
c3.execute("ATTACH DATABASE 'file::memory:?cache=shared' AS inmem")
How can I attach an in-memory SQLite database in Python?