-
-
Save zelark/1d79c3ce63d5a4795d6d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bottle import route, run, install | |
from bottle_sqlite import SQLitePlugin | |
install(SQLitePlugin(dbfile='bottle.db')) | |
@route('/db/') | |
def database(db): | |
data = db.execute('SELECT SQLITE_VERSION()').fetchone() | |
print "SQLite version: %s" % data | |
run(host='localhost', port=8080) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment