Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

-- coding: utf-8 --

SQLshite

🗄💩 A terrible SQLite Web UI

Not ready for general consumption, right now only browsing/viewing SQLite3 databases/tables is supported (and then barely).

Aim is a simple UI, that works on mobile for quick search. Focused on single table work, rather than fk/pk relationship display.

Primary aim:

Getting Started

From a source code checkout

python -m pip install -r requirements.txt
# TODO requirements_optional.txt
#python -m pip install -e .

Usage

python -m sqlshite.web.wsgi
python -m sqlshite.web.wsgi config.json

Where config.json contains:

{
	"databases": {
		"memory": ":memory:",
		"mydb": "mydb.sqlite3"
	}
}

Then open:

  • http://localhost:8777/d/
  • http://localhost:8777/d/memory/ - etc.

Design

URLs

That have been implemented

http://localhost/ - browse databases
http://localhost/d - browse databases

http://localhost/d/DATABASE_NAME - browse tables
http://localhost/d/DATABASE_NAME/sql - issue SQL queries

http://localhost/d/DATABASE_NAME/TABLE_NAME?q=SEARCH_TERM - quick search the first string column with automatic (pre and post) wild card

http://localhost/d/DATABASE_NAME/TABLE_NAME/jsonform.json - schema in jsonform - format
http://localhost/d/DATABASE_NAME/TABLE_NAME/rows - view (TODO cleanup and maybe edit for desktop view) rows in table
http://localhost/d/DATABASE_NAME/TABLE_NAME/add - add TODO actually INSERT into table
http://localhost/d/DATABASE_NAME/TABLE_NAME/rowid - currently dumps schema and value
http://localhost/d/DATABASE_NAME/TABLE_NAME/view/rowid - view
http://localhost/d/DATABASE_NAME/TABLE_NAME/view/rowid/view.json - jsonform with schema and data only

URLs TODO / TBD

http://localhost/d/DATABASE_NAME/TABLE_NAME - browse table (rows)?

TBD

http://localhost/d/DATABASE_NAME/TABLE_NAME/schema.json - schema in jsonform - format

http://localhost/d/DATABASE_NAME/TABLE_NAME?rowid=A - view? where rowid is sqlite specific rowid?

Where PRIMARY_KEY is not rowid (but it could be...)
http://localhost/d/DATABASE_NAME/TABLE_NAME/PRIMARY_KEY - edit/view?
http://localhost/d/DATABASE_NAME/TABLE_NAME/row/PRIMARY_KEY - view?
http://localhost/d/DATABASE_NAME/TABLE_NAME/view/PRIMARY_KEY - view?

http://localhost/d/DATABASE_NAME/TABLE_NAME/edit/PRIMARY_KEY - edit existing?

need to use hidden field for PK (compound pk?) in case pk is updated. Potentially use readonly (especially for view) http://localhost/d/DATABASE_NAME/TABLE_NAME/edit/PRIMARY_KEY/jsonform.json - schema+data in jsonform - format with data

Questions

  • Datatype support. date/datetime
  • how to handle add and edit errors, to avoid data loss:
    • from database
    • network?
    • temp store in local storeage until get confirmation back?

Datatypes

SQL             Python
TIMESTAMP       DateTime
bool/boolean    bool
varchar         string
string          string
int             integer
real            float

TODO consider Decimal support. TODO consider datetime as a mapping.

Release files for SQLshite 0.0.0.dev2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for SQLshite 0.0.0.dev2
File Size Uploaded
SQLshite-0.0.0.dev2.tar.gz 192.0 kB Details

Release files / SQLshite-0.0.0.dev2.tar.gz

Download URL SQLshite-0.0.0.dev2.tar.gz
Size 192.0 kB
Tags Source
SHA-256 checksum
How to use checksums
dcd7667b372f47891656e470441be6968168e0f82af608e070dd80a57036cd43
BLAKE2b-256 checksum
How to use checksums
37838cab9467930c9c844ad58d226384001ea53df53a02c397d1f28715ff7ff5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.8.3 requests/2.27.1 setuptools/44.1.1 requests-toolbelt/1.0.0 tqdm/4.64.1 CPython/2.7.17

Release history Release notifications | RSS feed

This release

0.0.0.dev2 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page