Skip to main content

A modern, secure, aesthetic and your ultimate DBMS client. Implemented as a CLI (Command-Line Interface) tool and written 100% in Python

Project description

PY DBMS — A Modern, Secure MySQL CLI Client

Experimental Release — v3.0.0 (Architecture Update)

Note on v3.0.0: This version marks a major internal overhaul focused on architecture modernization and long-term extensibility. While labeled Experimental, it establishes the foundation for multi-engine support and advanced data exporting in the upcoming v3.1.0 stable release.

PY DBMS is a modern, developer-focused command-line client for MySQL, built with Python.
It provides a clean terminal UI, readable query output, and powerful helper commands—without sacrificing safety or simplicity.

Designed for developers who live in the terminal but want a more structured, reliable experience than the default MySQL CLI.


Key Features

🏗️ NEW: Modular Architecture (v3.0)

  • Decoupled DB Connectors: Connection logic is now abstracted from the CLI core, enabling future support for additional engines (PostgreSQL, SQLite, etc.).
  • Internal Result Abstraction: Separates query execution from representation, allowing for consistent output across different display modes and export formats.

📤 NEW: Query Export System

  • Pluggable Export Manager: A centralized system to handle various file formats.
  • CSV Support: Export query results directly to .csv files using the new architecture.
  • Session Stability: Export operations are non-fatal; errors in formatting or file I/O will not terminate your active session.

Terminal UX

  • Rich Interface: Structured panels and tables for high readability.
  • Visual Feedback: Typewriter-style status messages and clear color-coded indicators for success, warnings, and SQL errors.
  • Startup Dashboard: ASCII banner and session summary on launch.

Configuration & Control

  • Persistent Config: Robust JSON-based system (config.json) for long-term settings.
  • Session Layer: Non-persistent configuration for runtime overrides.
  • Inline Helpers: Per-query flags like --expand for instant output formatting changes.

Security

  • Masked Credentials: Secure password handling at login.
  • Local-First: Designed with safe defaults for development environments.
  • Zero Persistence: Sensitive credentials are never stored in the configuration files.

Installation

Prerequisites

  • Python 3.10+ (recommended)
  • A running MySQL Server

Install via pip

pip install py-dbms-cli 

Usage

1. Run from your terminal

pydbms  

2. When prompted, enter credentials to establish connection with MySQL You will be prompted for:

  • Host
  • Username
  • Password (masked)

3. Begin querying

Enter SQL commands as you normally would.
Multi-line queries are supported and executed once terminated with ;.


Meta Commands

PY DBMS includes several helper commands, and helper flags for interactive usage:

Command Description
.help Show all helper commands
.databases List all databases
.tables List tables in the current database
.schema <table> Show CREATE TABLE definition
.clear Clear the terminal screen
.version Show build and version information
.config Show persistent configuration
.config set <section>.<key> <value> Update a config value
.config reset <section>.<key> Reset a config value
.session-config Show session-level configuration
.session-config set <key> <value> Update session-only settings
.session-config reset <key> Reset a session setting
.exit Exit the CLI
Flag Description
--expand Expand the result of query to not truncate in-view at End Of Line
--export Export result of a query to save it

NOTE: --export only implements csv as of v3.0.0


Roadmap

Planned future improvements include:

  • v3.1.0 (Stable): Integration of a Profile System for saved connections.

  • JSON Export: Adding JSON support to the pluggable export system.

  • Multi-Engine: Initial support for SQLite or PostgreSQL connectors.

  • Query History: Implementation of persistent command history.


Author

Anish Sethi
B.Tech Computer Science & Engineering
Delhi Technological University (Class of 2029)


License

This project is licensed under the BSD 3-Clause License.
Visit the BSD 3-Clause License page for more information.

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

py_dbms_cli-3.0.0.1.tar.gz (13.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

py_dbms_cli-3.0.0.1-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

File details

Details for the file py_dbms_cli-3.0.0.1.tar.gz.

File metadata

  • Download URL: py_dbms_cli-3.0.0.1.tar.gz
  • Upload date:
  • Size: 13.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for py_dbms_cli-3.0.0.1.tar.gz
Algorithm Hash digest
SHA256 64a47b8150d897b89d9e204fbc65800a18131a69905dca42d6930cbfbabd086f
MD5 75cc7f77b366313885d7678a74c7b486
BLAKE2b-256 d3487198d397ea5fc8489be18ce45b997c5386e1b577fa2697c9790ce56838ff

See more details on using hashes here.

File details

Details for the file py_dbms_cli-3.0.0.1-py3-none-any.whl.

File metadata

  • Download URL: py_dbms_cli-3.0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 17.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for py_dbms_cli-3.0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a289dfb21c325b753ae1519366c4d5c8371a7e01f44943e5505413e42c2eaf1b
MD5 5bae51870aceb01949fd45a6b79a6253
BLAKE2b-256 d77538f7fcff920440fe39f956adaa8ab651dbc8067aa17d04a48ce305131477

See more details on using hashes here.

Supported by

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