I have no idea why you would want to do this but here's a start. test.db will be in your web2py directory.
def sqlite():
import sqlite3 as lite
con = None
try:
con = lite.connect('test.db')
cur = con.cursor()
cur.execute('SELECT SQLITE_VERSION()')
data = cur.fetchone()
except lite.Error, e:
data = 'error'
finally:
if con:
con.close()
return dict(data=data)

