Skip to content

Instantly share code, notes, and snippets.

@zelark
Forked from dangayle/gist:1903175
Created June 2, 2014 14:28
Show Gist options
  • Save zelark/1d79c3ce63d5a4795d6d to your computer and use it in GitHub Desktop.
Save zelark/1d79c3ce63d5a4795d6d to your computer and use it in GitHub Desktop.

Revisions

  1. @dangayle dangayle created this gist Feb 24, 2012.
    11 changes: 11 additions & 0 deletions gistfile1.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    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)