Git Product home page Git Product logo

sqlite-web-urbexology's Introduction

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 (with support for older versions of Sqlite)
    • Indexes
  • Export data as JSON or CSV.
  • Import JSON or CSV files.
  • Browse table data.
  • Insert, Update or Delete rows.

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, triggers, and foreign keys (if any exist). From this page you can also create, rename or drop columns and indexes.

Columns are easy to add, drop or rename:

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:

The export tab supports exporting all, or a subset, of columns:

Basic INSERT, UPDATE and DELETE queries are supported:

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
  • -l, --log-file: filename for application logs.
  • -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.
  • -R, --rows-per-page: set pagination on content page, default 50 rows.
  • -e, --extension: path or name of loadable extension(s). To load multiple extensions, specify -e [path] for each extension.
  • -f, --foreign-keys: enable foreign-key constraint pragma.
  • -u, --url-prefix: URL prefix for application, e.g. "/sqlite-web".
  • -c, --cert and -k, --key - specify SSL cert and private key.
  • -a, --ad-hoc - run using an ad-hoc SSL context.

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

sqlite-web-urbexology's People

Contributors

coleifer avatar wd400 avatar minusf avatar brewingcode avatar swell-d avatar mryakobo avatar krisaoe avatar wdscxsj avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.