Metadata-Version: 2.4
Name: py-dbms-cli
Version: 2.5.0
Summary: A modern, secure, aesthetic and your ultimate DBMS client. Implemented as a CLI (Command-Line Interface) tool and written 100% in Python
Author-email: Anish Sethi <sethi.dynasty123@gmail.com>
License: Copyright 2025 Anish Sethi
        
        Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
        
        1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
        
        2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
        
        3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Project-URL: Homepage, https://github.com/Anish-Sethi-12122/py-dbms-cli
Project-URL: Source, https://github.com/Anish-Sethi-12122/py-dbms-cli
Project-URL: Issues, https://github.com/Anish-Sethi-12122/py-dbms-cli/issues
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: mysql-connector-python
Requires-Dist: rich
Requires-Dist: pyfiglet
Requires-Dist: sqlparse
Requires-Dist: pwinput
Dynamic: license-file

# PY DBMS — A Modern, Secure MySQL CLI Client

**Stable Release — v2.5.0**

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

### Terminal UX
- Rich-based terminal interface with structured panels and tables
- Clean, readable formatting for query results
- Typewriter-style text rendering for status messages
- ASCII startup banner and session dashboard

### Query Execution
- Multi-line SQL query support
- Accurate execution feedback (success, warnings, errors)
- Execution time reporting for SELECT queries
- Separate handling for SELECT vs DML / DDL operations

### Configuration & Control
- Persistent JSON-based configuration system (`config.json`)
- Session-level configuration for runtime behavior changes
- Inline query flags (e.g. `--expand`) for per-query output overrides
- Interactive configuration inspection and modification via meta-commands

### Security
- Masked password input
- Safe defaults for local development
- No credential persistence

---

## Installation

### Prerequisites
- Python **3.10+** (recommended)
- A running MySQL Server

### Install via pip
```bash
pip install py-dbms-cli  
```

### Usage

**1. Run from your terminal**
```bash
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 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 |

---

## Roadmap

Planned future improvements include:

- Exporting query results to CSV and JSON
- Extended output formatting options
- Support for additional database engines
- Improved extensibility for plugins and integrations

---

## 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](https://opensource.org/license/bsd-3-clause) for more information.
