DataBase Navigator for Flask
Project description
DB Navigator
DataBase Navigator for Flask
More images
Installation
pip install DBNavigator
Usage:
from flask import Flask
from db_navigator import DBNavigator
app = Flask(__name__)
DBNavigator(app, "users.db", prefix="/admin", password="1234")
### Your Flask app
app.run(debug=True)
DBNavigator(app
, file
, prefix=""
, password=""
, login_func=None
, readonly=False
)
app |
Flask app |
file |
Target database local file |
prefix |
Route prefix |
password |
Access password |
login_func |
Custom login function |
readonly |
Default editable |
Custom login
Must be returned True
for access.
It is recommended to save the password from the database in memory because it will be checked before each request.
def custom_login(password):
# make request to db
if password == "custom_value":
return True
DBNavigator(app, "users.db", login_func=custom_login)
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
DBNavigator-0.1.2.tar.gz
(250.0 kB
view hashes)
Built Distribution
DBNavigator-0.1.2-py3-none-any.whl
(252.7 kB
view hashes)
Close
Hashes for DBNavigator-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | baf4afaeba75ab850730a9c79796ead265041458021b0abafb674dd4c92dd131 |
|
MD5 | 42dd1fa659c27f8cc648024bee486bbf |
|
BLAKE2b-256 | d1f1a7b34ac6b0b0084d22752c41771413a06462c6901c618a02542e69cacddc |