This example below demonstrates some other useful methods.
#!/usr/bin/env python
import sys; sys.path.append('../../../') # show python where the web modules are
import web.database, web.database.object
connection = web.database.connect(type="sqlite", database="object-others.db")
cursor = connection.cursor() 
person = web.database.object.Table("Person")
person.addColumn(web.database.object.String(name="firstName"))
person.addColumn(web.database.object.String(name="surname"))
database = web.database.object.Database()
database.addTable(person)
database.init(cursor)
if not database.tablesExist():
    database.createTables()
    print "Created Table"
john = database['Person'].insert(firstName="John", surname="Smith")
owen = database['Person'].insert(firstName="Owen", surname="Jones")
print database['Person'].max('rowid')
print database['Person'].max('firstName')
print database['Person'].min('surname')
print database.output()
connection.commit()
The output is:
Created Table 2 Owen Jones +---------------------+ | Database 'Database' | +---------------------+ | Person | +---------------------+
See About this document... for information on suggesting changes.