Skip to main content

SQL plugin for Bottle

Project description

BottleSQL

SQL plugin for Bottle. Supports MySQL/MariaDB and SQLite.

Installation

PyPi

pip install <TODO>

Source

wget https://raw.githubusercontent.com/thepure12/bottle-sql/main/src/bottle_sql/bottle_sql.py

Usage

SQL

from bottle import Bottle
from bottle_sql import sqlPlugin

app = Bottle()
user, pw, host, db = ("root", "", "localhost", "mydb")
sql_plugin = sqlPlugin(user=user, password=pw, host=host, database=db)
app.install(sql_plugin)

SQLite

from bottle import Bottle
from bottle_sql import sqlitePlugin

app = Bottle()
dbfile= ":memory:"
sql_plugin = sqlitePlugin(dbfile)
app.install(sql_plugin)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bottle_sql-0.0.1.tar.gz (4.3 kB view hashes)

Uploaded Source

Built Distribution

bottle_sql-0.0.1-py3-none-any.whl (3.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page