Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

List tables of SQL databases for easy schema greps

Project Description

Description

greptable generates a plain-text list of your servers, databases and tables, so that you can easily find where the fuck that table is, with your favorite search tools, like grep.

This is especially useful if you are dealing with many servers and databases.

Requirements

greptable works on both Python 2 and Python 3.

The only dependency is SQLAlchemy, and it should support the same databases.

Usage

For global options run greptable -h.

Listing tables

To list the tables, run greptable dump.

You can change the configuration file path with the -c (also known as --config). By default, it uses ~/.config/greptable.conf if it exists, otherwise greptable.conf from the current directory.

The tables are listed to the standard output by default. The -o (also known as --output) option can dump in a file instead.

Example: greptable -c greptable.conf dump -o tables.txt

For full help on options run greptable dump -h.

Configuration

The configuration is a standard INI file. Section headers are SQLAlchemy URLs.

For example:

[mysql://user:password@server1]
[sqlite:///db.sqlite]

greptable will try to prettify server URLs, but you can also force a name.

For example:

[mysql://user:password@server1]
[sqlite:///db.sqlite]
name = db

Development

Contributions can be sent in the form of git patches, to laurent@bachelier.name.

Release History

Release History

History Node

1.1.0

This version
History Node

1.0.0

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
greptable-1.0.0.tar.gz (4.4 kB) Copy SHA256 Checksum SHA256 Source Jul 8, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting