Skip to main content

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, db_engine)

app Flask app
file Target database local file
prefix Route prefix
password Access password
login_func Custom login function
readonly Default editable
db_engine Default is SQLite

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)

DB Engine

A class that should inherit from the abstract class DataBaseInterface and implement all its functions.

from db_navigator.databases import DataBaseInterface

class YourDBEngine(DataBaseInterface):
	def __init__(self, *args):
		super().__init__(*args)
		self.__name__ = "Your DB Engine name"

💲Donate

Donatello
Donation Alerts

(But now it's better to email me and I'll send you the details)

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.2.2.tar.gz (578.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

DBNavigator-0.2.2-py3-none-any.whl (579.4 kB view details)

Uploaded Python 3

File details

Details for the file DBNavigator-0.2.2.tar.gz.

File metadata

  • Download URL: DBNavigator-0.2.2.tar.gz
  • Upload date:
  • Size: 578.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for DBNavigator-0.2.2.tar.gz
Algorithm Hash digest
SHA256 3bd9aee8a9a2a433781f27c1aecc78abb2e751ccdbe0657da3c036936ae64083
MD5 c5bee54dac74dee55db2515d92057553
BLAKE2b-256 76a38471d85f9d02bae5ec823a64cc2c432af29d32354c5a498644944fba8773

See more details on using hashes here.

File details

Details for the file DBNavigator-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: DBNavigator-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 579.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for DBNavigator-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5adc99a1edef32f0435e7336d8cb4fbee4c2f07a56cd28d19c06b48af378ac42
MD5 092369d627667e3b60e38625a40a6863
BLAKE2b-256 e796d896fc664a42ec0b0d0a87761636c4fdf9db8e3f2b4f67ca78a6b6e1fc9c

See more details on using hashes here.

Supported by

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