Skip to main content

DB33 Studio

A free, open source database client for PostgreSQL, MySQL, SQLite and Redis. It runs in your browser and has no paid tier.

pip install db33studio
db33studio          # opens on http://127.0.0.1:2100

Why DB33 Studio

  • Complete Free. Apache-2.0. One build, no upgrades, no downgrades, no premium, no per user pricing , every feature, truly free and open source, nothing held back.
  • straightforward start using it instantly and everything will feel familiar. you start writing SQL autocomplete makes hard to forget table or column names.
  • Small. One Python process, about 60 MB of RAM.
  • Local. Binds loopback, no login, no telemetry, no account verification.
  • Four engines, one UI. Same tree, tabs and shortcuts everywhere.

Table data, dark theme

Features

What each engine gives you:

PostgreSQL MySQL / MariaDB SQLite Redis
Save / test / edit connections yes yes yes yes
Schema tree (tables, views, enums) yes yes (databases as schemas) tables + views logical DB
Paged table data, filter, sort, inspect yes yes yes not applicable
Row inspector with FK navigation yes yes yes not applicable
Structure: columns, keys, constraints, indexes yes yes yes not applicable
Table DDL reconstructed SHOW CREATE TABLE from sqlite_master not applicable
SQL editor, multi-statement yes yes yes command bar instead
Read-only SQLite file mode - - yes -
Key browser with SCAN and type filter - - - yes
Key detail for string/hash/list/set/zset/stream - - - yes
Command bar with admin-command blocklist - - - yes
TTL / rename / delete keys - - - yes

Every SQL engine supports connection testing with the server version and latency, CSV export of the loaded rows, and both themes. Redis connections test the same way and open the key browser instead of the table and query tabs.

Project layout

src/db33studio/    Python package: FastAPI app, engines, handlers, SQL migrations
web/               Svelte 5 + TypeScript + Tailwind source for the UI
scripts/           build_ui.py (stage the compiled UI), seed_demo.py
tests/             pytest suite
docs/              API contract, engine notes, screenshots

Architecture

src/db33studio/              FastAPI package and all target-database access
  main.py server.py          entrypoint, app factory, lifespan (migrations)
  db.py                      aiosqlite wrapper for the local metadata store
  engines/
    base.py                  Engine ABC, dataclasses, identifier/value/SQL helpers
    registry.py              open_engine(record), test_engine(record)
    sqlite.py postgres.py mysql.py redis.py
    redis_commands.py        Redis command tokenizer + blocklist (pure functions)
  model/connections/         Pydantic DTOs and the connections service
  model/tabs/                workspace tab DTOs and the tabs service
  handlers/                  thin routers: connections, tables, query, redis, tabs, UI
  lib/                       response envelope, errors, migrations
  migrations/                the app's own SQLite schema
  webui/                     compiled UI, written by scripts/build_ui.py (gitignored)

web/                         Svelte 5 + TypeScript + Tailwind v4 SPA
  src/App.svelte             shell, routing between screens
  src/lib/api/               typed client: connections, schema, query, redis, tabs
  src/lib/stores/            theme, layout panels, connections, workspace tabs, catalog, toasts
  src/lib/tabs.ts            tab reordering and id helpers, pure functions
  src/lib/lines.ts           line counts and gutter widths, pure functions
  src/lib/components/
    layout/                  title bar, connection rail, jump search, theme toggle
    connections/             new/edit connection screen
    schema/                  object tree
    data/ data grid           shared by the table and query tabs
    workspace/               tab strip with drag reorder, empty state
    table/                   table tab: data, filters, inspector, structure
    query/                   SQL editor and per-statement results
    highlight/               per-dialect highlighting for the query editor and Redis command bar
    redis/                   key list, key detail, command bar
    ui/                      buttons, inputs, badges, modal, toasts, icons
  tests/                     vitest for pure helpers

scripts/
  build_ui.py                builds web/, copies web/dist into src/db33studio/webui
  seed_demo.py               reproducible SQLite demo database
tests/                       pytest suite
docs/                        CONTRACT.md, db.md, engines.md, screenshots/

Handlers never talk to a driver. They resolve the saved connection, open one engine from engines/registry.py for the request, and close it again. Engines are the only place with dialect SQL. The full API and data-shape contract lives in docs/CONTRACT.md.

Development Requirements

  • Python 3.11+ (tested on 3.14)
  • Node 20.19+ and npm (tested on Node 24, npm 12)
  • A reachable PostgreSQL / MySQL / Redis server only if you want to use those engines. SQLite needs nothing extra.

Setup and run

From the repo root:

python3 -m venv .venv
. .venv/bin/activate
python -m pip install -e ".[dev]"

python scripts/build_ui.py          # builds web/ and stages the compiled UI
python -m db33studio --debug        # or: db33studio --debug -> http://127.0.0.1:2100

The editable install reads dependencies from pyproject.toml; there is no requirements.txt. scripts/build_ui.py installs npm packages if needed, runs npm run build, and stages web/dist into src/db33studio/webui. Run the suite with python -m pytest.

Copy .env.example to .env if you want to change the defaults; the built-in defaults work as-is.

For UI work with hot reload, run Vite in a second terminal:

cd web
npm install
npm run dev                 # http://localhost:5173

Vite proxies /api to 127.0.0.1:2100. For a production build, npm run build writes web/dist; serve it from any static server that proxies /api to the backend, or set VITE_API_BASE to an absolute API URL at build time.

Environment variables (see .env.example):

variable default meaning
HOST 127.0.0.1 bind address when not running --debug
PORT 2100 backend port
DATABASE_PATH per-user data dir optional path to the app's own SQLite file with saved connections
QUERY_TIMEOUT_SECONDS 30 per-request budget for tables, queries and Redis

The server binds loopback only, because the app has no authentication and its metadata file holds saved passwords. Set HOST=0.0.0.0 deliberately if you want to reach it from another machine, and treat that as exposing your databases. --debug also binds 127.0.0.1, and additionally enables auto-reload.

Demo database

The SQLite demo is reproducible and safe to re-run (it rewrites data/demo.db only):

python scripts/seed_demo.py
# Seeded .../data/demo.db with 10 customers and 40 orders.

Then create a connection in the UI with engine SQLite and the absolute path to data/demo.db. The database has customers, orders (FK, check constraints, NULLs, two indexes) and a daily_revenue view.

For Redis, any reachable server works. The browser uses SCAN, never KEYS, so an empty database simply shows the empty state.

How to use it

  1. Connect. Pick an engine, fill the form, press Test for the server version and latency, then Save & connect. Connections stay in the left rail; the chip in the title bar reopens the editor.
  2. Browse. The tree groups tables, views and enums, and the filter box is instant. Ctrl/Cmd+K jumps to any table. Ctrl/Cmd+B hides the sidebar for a full-width pane, for the table tree and the Redis key list alike; the choice is remembered per browser.
  3. Table data. Headers show the column type plus PK / FK badges. WHERE and ORDER BY take raw SQL: pick a page size and press Apply.
    • Click a row number for the inspector. Foreign keys get an "Open ... row" button that opens the target table filtered to that value.
    • The inspector is a right sidebar with its own toggle, also remembered.
  4. Structure. Switch the toolbar to Structure for columns, constraints, indexes, the FK graph and the DDL. The gutter is decorative, so it never lands in a copy, and long definitions wrap instead of clipping. Copy or export it.
  5. Queries. + or the empty state opens a query tab.
    • Tabs survive a reload: text, filters, view, order and the active tab are kept per connection in the app's own SQLite file, not your database. Closing a tab deletes it. Alt+Left / Alt+Right switches between tabs; drag, or Alt+Shift+Left / Alt+Shift+Right, reorders them.
    • Ctrl/Cmd+Enter runs the selection, or the whole buffer. Each ;-statement gets a result tab with rows, affected counts and duration, plus a green or red strip reporting the outcome. Failures get a Retry.
    • Completion covers keywords, functions, tables after FROM / JOIN, columns as alias. or table., aliases the statement declares, and schemas once there is more than one. After CONSTRAINT and USING INDEX it offers that table's constraint, foreign-key and index names. Tab accepts, Escape closes, Ctrl/Cmd+Space opens the list. Columns and names are fetched on demand, so ALTER shows up immediately.
    • Drag the splitter under the editor, use the arrow keys on it, or double-click to reset. The height is remembered per browser.
  6. Redis. Set a MATCH pattern, filter by type, and browse keys grouped by prefix with TTLs. Detail pages per type, Rename / Set TTL / Delete, and a command bar that prints nested replies readably.
  7. Theme. The title-bar toggle switches dark and light, remembered in localStorage.

Keyboard shortcuts

Every toolbar button advertises its chord in the hover title. Ctrl/Cmd is used for app-wide actions so typing in a field never loses a character; Alt is used for the actions of the panel that is on screen, and the panel owns them: while a table tab is open Alt+R refreshes the table, otherwise it refreshes the tree.

Action Keys
Run query (selection, else everything) Ctrl/Cmd+Enter
Complete the word under the caret Ctrl/Cmd+Space
Jump to a table or view Ctrl/Cmd+K
Show / hide the sidebar Ctrl/Cmd+B
Switch dark / light Ctrl/Cmd+Shift+L
Connections screen Alt+C
New query / new connection Alt+N / Alt+Shift+N
Close tab Alt+W
Previous / next tab Alt+Left / Alt+Right
Move the open tab Alt+Shift+Left / Alt+Shift+Right
Data / Structure view Alt+1 / Alt+2
Row inspector Alt+I
Refresh the current panel, or retry Alt+R
Export the current grid (CSV) or the DDL Alt+S
Copy DDL / copy the inspected row as JSON Alt+Shift+C
Dismiss the query outcome strip Alt+Shift+D
Previous / next page (table rows, Redis keys and entries) Alt+[ / Alt+]
Run command (Redis), apply filters, save and connect Alt+Enter
Rename / Set TTL / Delete a Redis key Alt+M / Alt+T / Alt+Delete
Test / save a connection Alt+T / Alt+S
Close a dialog, cancel the connection form Esc

Tests

Backend (from the repo root):

python -m pytest

The suite covers the SQLite engine end to end, connection CRUD and validation, table/query endpoints, workspace tab persistence, the Redis tokenizer and a fakeredis-backed Redis engine. It runs against temporary databases and never touches a real server.

Optional live engine checks create and drop one probe table in the configured database, then disconnect:

TEST_POSTGRES_DSN=postgresql://user:pass@127.0.0.1:5432/testdb python -m pytest -q
TEST_MYSQL_DSN=mysql://user:pass@127.0.0.1:3306/testdb python -m pytest -q

Frontend (from web/):

npm run check     # svelte-check, zero warnings expected
npm test          # vitest, pure helpers only
npm run build

Package / PyPI

The wheel bundles the compiled UI and the SQL migrations, so one install serves both the SPA and the API. pip puts a db33studio command on your PATH:

python scripts/build_ui.py && python -m build --wheel   # dist/db33studio-<version>-py3-none-any.whl

pip install db33studio
db33studio                  # then open http://127.0.0.1:2100
db33studio --help           # --port 8080, or --debug for auto-reload

It runs from any directory: the UI and the migrations are read from the installed package, and the connection list lives in your per-user data directory. python -m db33studio is the same entry point if you prefer it.

The Svelte source in web/ is never part of the wheel: build the UI first, then build the wheel. Distribution metadata (version, dependencies, console script) lives in pyproject.toml, and the version comes from db33studio.__version__.

Supported operations and limitations

  • Raw SQL is intentional. The WHERE and ORDER BY fields and the query editor send SQL to the server verbatim. The app does not parse or sanitise them. UPDATE, DELETE, DROP and friends will run, and there is no transaction history or undo. Use a read-only connection where it matters.
  • Local single-user storage. Saved connections and the open tabs of each connection live in the app's own SQLite file in the per-user data directory (~/.local/share/db33studio/app.db on Linux, %LOCALAPPDATA%\db33studio\app.db on Windows, ~/Library/Application Support/db33studio/app.db on macOS), overridable with DATABASE_PATH. There is no login, no sharing and no encryption. The backend has no authentication either, so keep it on localhost, which is the default, unless you have put your own access control in front of it.
  • Passwords are stored in plaintext. The password column in that database file is not encrypted. The API never returns it (responses expose has_password only) and the UI never renders it, but anyone who can read that file can read the credentials. Prefer dedicated read-only database users, and delete connections you no longer need.
  • Limits. Query results are capped at 500 rows; table pages at 1000 rows (default 100); Redis scans and key detail pages at 1000 entries. Every request has a 30 s budget by default (QUERY_TIMEOUT_SECONDS). These caps are technical, sized so one request cannot eat your memory. They are not a paywall: there is no tier that raises them, and the timeout is yours to change.
  • Identifiers versus values. Schema and table names are validated against a conservative pattern and quoted per dialect. Filter values must be written as SQL literals by you, because the whole clause is raw.
  • Redis. SCAN is used for key listing, so a pattern is not a KEYS scan and type filtering happens after TYPE per key. Server administration is blocked in the command bar: CONFIG, SHUTDOWN, DEBUG, MONITOR, SAVE, BGSAVE, FLUSHALL, FLUSHDB, MIGRATE, REPLICAOF, SLAVEOF, ACL, MODULE, SCRIPT, EVAL, EVALSHA, FUNCTION.
  • No schema editing. This client reads and queries data; it does not create or alter tables. Use a migration tool for that.
  • DDL fidelity. PostgreSQL DDL is reconstructed from catalogs and is readable but not byte-identical; if the catalogs are not readable by the connected role, ddl is null. MySQL DDL comes from SHOW CREATE TABLE; index sizes are not exposed and are null. SQLite DDL is the stored CREATE statement.
  • Row counts. Tree estimates are server statistics (PostgreSQL reltuples, MySQL TABLE_ROWS), not exact. The grid footer comes from a real COUNT(*) with the current filter.
  • Not included. SSH tunnels, cloud IAM auth, schema diffs, import files, saved query library, TLS client certificates, and multi-user access.

Screenshots

New connection Table structure
Query tab Query autocomplete
Redis browser Table data
Table data, light theme Query tab, light theme

Every screenshot lives in docs/screenshots.

License

Apache License 2.0. See LICENSE.

Copyright 2026 Hussein Al-Madhachi.

Metadata

Release files for db33studio 1.0.2

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

Built distribution (wheel)

Table of built distributions (wheels) for db33studio 1.0.2
File Interpreter ABI Platform Actions
db33studio-1.0.2-py3-none-any.whl Python 3 none any Details for db33studio-1.0.2-py3-none-any.whl

Release files / db33studio-1.0.2-py3-none-any.whl

Download URL db33studio-1.0.2-py3-none-any.whl
Size 155.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bec69601c675071af2a17e256e73cbcd7f123d0a12e100392c76080840636979
BLAKE2b-256 checksum
How to use checksums
072ff2709bc8744fb6f0eb51b87b218d8203433673002934dc08d8fa9bce9229
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Security for db33studio 1.0.2

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.

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