SQL plugin for Bottle
Project description
BottleSQL
SQL plugin for Bottle. Supports MySQL/MariaDB and SQLite.
Installation
PyPi
pip install pip install bottle-sql==0.0.1
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
Release history Release notifications | RSS feed
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.2.tar.gz
(4.3 kB
view hashes)
Built Distribution
Close
Hashes for bottle_sql-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6512448a47ab057a3a8e8d4674ebb4dc3022ecaae9399793e25a2b82db9245a4 |
|
MD5 | 078515dd2b58e831556396b94f1d181e |
|
BLAKE2b-256 | 99db86ae57f8e227efebb9e1e0b1f8ab1fa7d72dcd000a08d4602dadc0f0fb3a |