pg-table-markdown

A command line tool that generates markdown documentation for Postgres tables in a given schema

Showing:

Popularity

Downloads/wk

0

GitHub Stars

71

Maintenance

Last Commit

5yrs ago

Contributors

4

Package

Dependencies

0

License

UNKNOWN

Categories

Readme

A command line tool that generates Markdown documentation for Postgres tables in a given schema.

Installation

pip install pg-table-markdown

Note: Since pg-table-markdown is intended to connect to Postgres databases, it has a dependedncy on psycopg2. However, psycopg2 includes compiled C modules, and therefore may require compiling from source if it's not already installed. Installing via pip will require python-dev and libpq-dev. psycopg2 maintainers generally recommend installing from binary instead.

Usage

Usage: pgtablemd [OPTIONS]

  Export Postgres table documentation to a markdown file

Options:
  --database_url TEXT  Database connection URL
  --table_schema TEXT  Postgres table_schema, default is: public
  --output_file TEXT   Path for generated markdown file
  --max_length         To display maximum length of character varying, default is: False
  --help               Show this message and exit.

Note: For those unfamiliar with Postgres database connection URLs, they use the following format:

postgres://username:password@host:port/dbname

Sample Output

The generated Markdown details the column name, type, and default value for each table defined in your schema. It also displays nicely in GitHub (see more here).

app_users

ColumnTypeDefaultNullable
idintegernextval('app_users_id_seq'::regclass)NO
emailcharacter varyingNoneNO
passwordcharacter varyingNoneYES
is_activebooleantrueYES
is_adminbooleanfalseYES

Run tests with Docker Compose

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial