If you want to follow the web.py tutorial using SQLite here’s how:

The line for your Python to connect to DB:

db = web.database(dbn='sqlite', db='testdb')

To create the database type sqlite3 testdb and input this SQL:

CREATE TABLE todo (id integer primary key, title text, created date, done boolean default 'f');
CREATE TRIGGER insert_todo_created after insert on todo
update todo set created = datetime('now')
where rowid = new.rowid;

Now create an entry with this SQL

insert into todo (title) values ('Learn web.py');

Finally, quit sqlite3 when you’re ready by typing .quit