Skip to main content

A Flask-based web dashboard for SQLite database query and management

Project description

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

SQLite Opus Dashboard

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")
  • max_query_results: Maximum number of query results to return (default: 1000)
  • query_results_per_page: Rows per page for paginated SELECT results (default: 50)
  • enable_cors: Enable CORS support (default: True)

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.

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

sqlite_opus-0.2.0.tar.gz (19.0 kB view details)

Uploaded Source

Built Distribution

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

sqlite_opus-0.2.0-py3-none-any.whl (21.3 kB view details)

Uploaded Python 3

File details

Details for the file sqlite_opus-0.2.0.tar.gz.

File metadata

  • Download URL: sqlite_opus-0.2.0.tar.gz
  • Upload date:
  • Size: 19.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.8

File hashes

Hashes for sqlite_opus-0.2.0.tar.gz
Algorithm Hash digest
SHA256 31e6cbcd88ba4506d1b968a2596ed30ef42399288f9e296684be363c52e33992
MD5 6e8a117b78e30bcc761f4f4ee311d9ff
BLAKE2b-256 f90b7956220efb4f7568cb13e0621811036279b15604241ce82f36e5ed96f52a

See more details on using hashes here.

File details

Details for the file sqlite_opus-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: sqlite_opus-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 21.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.8

File hashes

Hashes for sqlite_opus-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c300c36407c2e50655363fa59fccd748d60180fe99b7ee8891b243c9aa151429
MD5 a23ae940e65bd6556cec586c85fd67c2
BLAKE2b-256 7ac279ce7cf3123c78351aeb631faf90e5d265b201c9341c2b45fad644d27f90

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