sqlite-web

Web-based SQLite database browser written in Python

Github星跟踪图

sqlite-web is a web-based SQLite database browser written in Python.

Project dependencies:

Installation

$ pip install sqlite-web

Usage

$ sqlite_web /path/to/database.db

Features

  • Works with your existing SQLite databases, or can be used to create new databases.
  • Add or drop:
    • Tables
    • Columns (yes, you can drop and rename columns!)
    • Indexes
  • Export data as JSON or CSV.
  • Import JSON or CSV files.
  • Browse table data.

Screenshots

The index page shows some basic information about the database, including the number of tables and indexes, as well as its size on disk:

The structure tab displays information about the structure of the table, including columns, indexes, and foreign keys (if any exist). From this page you can also create, rename or drop columns and indexes.

The content tab displays all the table data. Links in the table header can be used to sort the data:

The query tab allows you to execute arbitrary SQL queries on a table. The query results are displayed in a table and can be exported to either JSON or CSV:

The import tab supports importing CSV and JSON files into a table. There is an option to automatically create columns for any unrecognized keys in the import file:

Command-line options

The syntax for invoking sqlite-web is:


$ sqlite_web [options] /path/to/database-file.db

The following options are available:

  • -p, --port: default is 8080
  • -H, --host: default is 127.0.0.1
  • -d, --debug: default is false
  • -x, --no-browser: do not open a web-browser when sqlite-web starts.
  • -P, --password: prompt for password to access sqlite-web.
    Alternatively, the password can be stored in the "SQLITE_WEB_PASSWORD"
    environment variable, in which case the application will not prompt for a
    password, but will use the value from the environment.
  • -r, --read-only: open database in read-only mode.
  • -u, --url-prefix: URL prefix for application, e.g. "/sqlite-web".

Using docker

A Dockerfile is provided with sqlite-web. To use:


$ cd docker/  # Change dirs to the dir containing Dockerfile
$ docker build -t coleifer/sqlite-web .
$ docker run -it --rm \
    -p 8080:8080 \
    -v /path/to/your-data:/data \
    -e SQLITE_DATABASE=db_filename.db \
    coleifer/sqlite-web

主要指标

概览
名称与所有者coleifer/sqlite-web
主编程语言Python
编程语言Python (语言数: 6)
平台
许可证MIT License
所有者活动
创建于2014-11-08 05:26:31
推送于2025-03-27 13:21:22
最后一次提交2025-03-27 08:20:58
发布数27
最新版本名称0.6.4 (发布于 )
第一版名称0.1.0 (发布于 )
用户参与
星数3.7k
关注者数75
派生数359
提交数176
已启用问题?
问题数147
打开的问题数0
拉请求数9
打开的拉请求数0
关闭的拉请求数24
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?