Skip to main content

A quick database table viewer

Project description

peepDB

peepDB is an open-source command-line tool and Python library designed for developers and database administrators who need a fast and efficient way to inspect their database tables without writing SQL queries. With support for MySQL, PostgreSQL, and MariaDB, peepDB is lightweight, secure, and incredibly easy to use.

🚀 Features

  • Multi-Database Support: Works with MySQL, PostgreSQL, and MariaDB.
  • Quick Data Inspection: View all tables or a specific table with a simple command.
  • User-Friendly CLI: Easy-to-use command-line interface powered by Click.
  • Secure Local Storage: Securely store database connection details with encryption on your local machine.
  • Lightweight: Minimal footprint, designed for speed.
  • Formatted Output: View data in a clean, formatted table or JSON format.
  • Pagination: Efficiently handle large datasets by viewing data in manageable chunks.

peepDB example 1 peepDB example 2

Note: This image reflects the commands used in the official release (v0.1.3)

📦 Installation

You can install peepDB directly from PyPI:

pip install peepdb

Requirements:

  • Python 3.6 or higher
  • pip (Python package installer)

Note: If peepdb gives an error like "The term 'peepdb' is not recognized as the name of a cmdlet" remember to add the Python Scripts folder to your PATH in Windows.

System Dependencies

Before installing peepdb, ensure you have the following system dependencies:

sudo apt-get update
sudo apt-get install libmariadb3 libmariadb-dev

Verify the installation by running:

peepdb --version

🛠️ Usage

peepDB uses a command-based structure for easier and more intuitive use. Here are the main commands:

1. Save Your Database Connection Details

peepdb save <connection_name> --db-type [mysql/postgres/mariadb] --host <host> --user <user> --database <database>

You'll be prompted securely for the password.

2. List Saved Connections

peepdb list

3. View Tables

View all tables:

peepdb view <connection_name>

View a specific table:

peepdb view <connection_name> --table <table_name>

4. Pagination

Use pagination to handle large datasets:

peepdb view <connection_name> --table <table_name> --page <page_number> --page-size <rows_per_page>

5. Choose Output Format

Get output in JSON format:

peepdb view <connection_name> --format json

6. Remove Saved Connections

Remove a specific connection:

peepdb remove <connection_name>

Remove all connections:

peepdb remove-all

For more detailed usage information on any command, use the --help option:

peepdb <command> --help

👨‍💻 For Developers

Please refer to our Contributing Guide for information on setting up the development environment, running tests, and contributing to peepDB.

🔒 Security

peepDB implements several security measures to protect your database connection details:

  1. Local Storage: All connection details are stored locally on your machine, not on any remote servers.
  2. Encryption: Connection details are encrypted before being stored, using the cryptography library.
  3. Secure Password Input: Passwords are never shown in plain text and are input securely.

However, please note that while we strive to implement best security practices, peepDB's security has not been verified by a third party. Users should exercise caution and follow general security best practices when using any tool that handles sensitive information.

The encryption key is stored in your user directory (~/.peepdb/key.key). Keep this key safe and do not share it.

📜 License

Distributed under the GNU General Public License Version 3. See the LICENSE file for more details.

📚 Documentation

For more detailed documentation, please visit our GitHub Pages.

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

peepdb-0.1.3.tar.gz (24.0 kB view details)

Uploaded Source

Built Distribution

peepdb-0.1.3-py3-none-any.whl (24.5 kB view details)

Uploaded Python 3

File details

Details for the file peepdb-0.1.3.tar.gz.

File metadata

  • Download URL: peepdb-0.1.3.tar.gz
  • Upload date:
  • Size: 24.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for peepdb-0.1.3.tar.gz
Algorithm Hash digest
SHA256 87a01c6fa7ef726063f6953b91fbf8e27c980c3229243f19fb407c489f037748
MD5 bb3caf34e31c7b52ff5ecb89c5abf856
BLAKE2b-256 3e4cae06dfe2aef1f35e650a3f8d96058594e9c4f79d880f97e76a9f50b7c70f

See more details on using hashes here.

File details

Details for the file peepdb-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: peepdb-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 24.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for peepdb-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 83e37c5b8023c162f5e33322b9554324e68bf8d1391ef93a009aeba432a41654
MD5 b8fc54a61ea12dffc05f4b20a1f21709
BLAKE2b-256 9e983a7788c0f8f7e2f3c9c4ae44b68e225b9fb42d9329ba87550dbb20bbe9da

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