SQLite Opus
A Flask-based web dashboard for SQLite database query and management.
Installation
pip install sqlite-opus
Or install from source:
git clone https://github.com/hungle00/sqlite-opus.git
cd sqlite-opus
pip install -e .
Quick Start
SQLite Opus can be used as a library, similar to Flask-MonitoringDashboard:
from flask import Flask
import sqlite_opus as dashboard
app = Flask(__name__)
# Bind the dashboard to your Flask app
dashboard.bind(app)
# The dashboard will be available at http://localhost:5000/sqlite-opus
app.run()
Screenshots
Dashboard: tables list, table schema viewer, and SQL query editor with results.
Configuration
You can customize the dashboard configuration:
import sqlite_opus as dashboard
# Option 1: Configure before binding
dashboard.config.url_prefix = "my-dashboard"
dashboard.config.max_query_results = 500
dashboard.bind(app)
# Option 2: Configure during binding
dashboard.bind(
app,
url_prefix="my-dashboard",
max_query_results=500,
enable_cors=True
)
Configuration Options
url_prefix: URL prefix for dashboard routes (default:"sqlite-opus")db_path: Path to a SQLite database file for auto-connect on startupenable_cors: Enable CORS support (default:True)auth_user/auth_password: HTTP Basic Auth for all dashboard routes (optional). When both are set, every request must supply valid credentials.allow_dml: IfTrue, allow write queries (INSERT/UPDATE/DELETE/CREATE/…). Default:False(read-only).
Security (production): Use Basic Auth and keep allow_dml disabled in production for a more secure setup. Example:
dashboard.bind(
app,
auth_user="admin",
auth_password="your-strong-password",
allow_dml=False, # read-only
db_path="data.db",
)
Features
- Web-based SQLite Query Interface: Execute SQL queries through a web dashboard
- Database Connection Management: Connect to and disconnect from SQLite databases
- Table Schema Viewer: View table structures and schemas
- Query Results Display: View query results in a formatted table with pagination (powered by the paginate library)
Development
Setup Development Environment
# Create virtual environment
python3.10 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install in development mode with dev dependencies
pip install -e ".[dev]"
Requirements
- Python >= 3.10
- Flask >= 2.3.0
- Flask-CORS >= 4.0.0 (optional, for CORS support)
License
MIT License
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Metadata
Release files for sqlite-opus 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sqlite_opus-0.3.1.tar.gz | 20.9 kB | Without provenance | Details for sqlite_opus-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sqlite_opus-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for sqlite_opus-0.3.1-py3-none-any.whl |
Total release size: 44.6 kB
Release files / sqlite_opus-0.3.1.tar.gz
| Download URL | sqlite_opus-0.3.1.tar.gz |
|---|---|
| Size | 20.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
40278743ef2a6f209c4ed2102dd091dd70c46f9ea1127b57fa29fac29a90109f
|
|
BLAKE2b-256 checksum How to use checksums |
bf48c106f8786accc058797c974788dd91078c474ea3dbe7c8058b238c62316f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.8
|
Release files / sqlite_opus-0.3.1-py3-none-any.whl
| Download URL | sqlite_opus-0.3.1-py3-none-any.whl |
|---|---|
| Size | 23.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d4332501c7f9dccd76431a071068d2154ed9d39e9ddcb7db82279d1858b9c6f2
|
|
BLAKE2b-256 checksum How to use checksums |
9e5bf3b58e1d22c80b37da63d1de074fe3f03e621786dd048c6ad58aa45872cd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.8
|
Security for sqlite-opus 0.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.