python
import web
from PyDBLitewebpy import Database
python
db = Database('path/to/database/file.db')
python
urls = (
'/', 'index'
)
app = web.application(urls, globals())
python
class index:
def GET(self):
return "Hello, world!"
def POST(self):
data = web.input()
result = db.query('SELECT * FROM table')
return str(result)
python
if __name__ == "__main__":
app.run()