Hackable GUI SQL-manager written in SQL itself (and a pinch of the HTML templates).
"If you want something done, do it yourself. Yep!"
Jean-Baptiste Emanuel Zorg, "The Fifth Element", 1997.
Malewicz is a cross-platform Database GUI tool for developers, SQL programmers, DBAs and data analysts.
Malewicz is Yet Another WEB client for DB schema exploring and performance analysis. Something like PgHero, Pgweb or even phpMyAdmin, but with some key features:
- Hackable - Malewicz was originally created specifically for hacking and extending (template driven, live reload)
- Suprematistic - use only your SQL skills (and a little bit HTML) without any noisy boilerplate code
- Template driven - we use all power of Jinja
- Lightning-fast AJAX web interface - but without a single line of JavaScript (we use Hotwire Turbo)
- Simple and powerful integration with awesome tools, for charts, diagrams etc.
- Strong bodrer - between SQL-scripts (it's our main value) and representation templates
- Reusable SQL-queries - you can reuse queries in other contexts and database tools.
Malewicz has no embedded SQL editor. Instead, you might use your favorite code editor (like Vim or VS Code) or IDE (like DBeaver or DataGrips) for edit plain sql-files.
- dbt - Just drop your SQL-queries to your repository and the magic happens
- YeSQL - Keep the SQL as SQL
- Treat your Database as Code
Init and activate virtual env (optional):
virtualenv .venv
source .venv/bin/activate
Install dependencies:
pip3 install -r requirements.txt
Set database connection parameters in config.toml
file or set environment variable DATABASE_URL
with datbase URI:
postgres://[USER]:[PASSWORD]@[HOST]:5432/[DATABASE]
Run:
python app.py
cd demo
docker-compose up -d
- Use Python-style naming for parameters:
%(schema_name)s
,%(max_table_count)s
- Keep to axis when formatting
For productive and fast work with SQL scripts and Jinja2 templates we use Visual Studio Code with some additional plugins:
- Better Jinja - Syntax highlighting for jinja(2) including HTML, SQL, JSON, Markdown and other templates.