Skip to main content

dbcls is a versatile client that supports various databases

Project description

DbCls

DbCls is a versatile client for multiple databases, enabling the editing and preservation of SQL queries in a file, and executing queries directly from the editor, thereby providing a convenient interface for data representation.

Briefly, this application combines the kaa editor and the visidata data visualization tool.

Editor

Data representation

Installation

pip install dbcls

Run

dbcls -H 127.0.0.1 -u user -p mypasswd -E mysql -d mydb mydb.sql

Using config file rather then process arguments to configure

dbcls -c config.json mydb.sql

Where config file is:

{
    "host": "127.0.0.1",
    "port": "3306",
    "username": "user",
    "password": "mypasswd",
    "dbname": "mydb",
    "engine": "mysql"
}

or from bash file

#! /bin/bash

CONFIG='{
    "host": "127.0.0.1",
    "port": "3306",
    "username": "user",
    "password": "mypasswd",
    "dbname": "mydb",
    "engine": "mysql"
}'

dbcls -c <(echo "$CONFIG") mydb.sql

Hotkeys

  • Alt + r - Execute query under cursor or selected text
  • Alt + e - Show databases list
  • Alt + t - Show tables list
  • Ctrl + q - Quit
  • Ctrl + s - Save file

Options

-H --host

Host to connect to

-u --user

Username to connect as

-p --password

Password to use when connecting to server

-E --engine

Database engine, options are: mysql, postgresql, clickhouse

-d --database

Database to use

-P --port

Port number to use for connection (optional)

-c --config

Path to a config file to use

Bugs

See github issues: https://github.com/Sets88/dbcls/issues

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dbcls-1.1.1.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

dbcls-1.1.1-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

Details for the file dbcls-1.1.1.tar.gz.

File metadata

  • Download URL: dbcls-1.1.1.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.7

File hashes

Hashes for dbcls-1.1.1.tar.gz
Algorithm Hash digest
SHA256 c7391574c8a5c2c7413d8a5b4ebcfcf910d60cb2832b02673447d3e9a71c69bb
MD5 8845b5e372d3f7b4d2e9a9b4a63eeb52
BLAKE2b-256 9d3a2c086c5cc94b6f969ede6fd39fbd94d9087a3bc4fe63182f02313acc047e

See more details on using hashes here.

File details

Details for the file dbcls-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: dbcls-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 11.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.7

File hashes

Hashes for dbcls-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d4e7adebbd89823de74e9b1876f3d0e516e847b7cc4c8c0d54b9d9a8b2031b41
MD5 56f65c395d22f5943f188fb2b72a4555
BLAKE2b-256 e983ccbec5bf115c4f27d26a93ebcf3453828891c9e6402835e5f4661e842024

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page