• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

vokal/pg-table-markdown: A command line tool that generates markdown documentati ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

vokal/pg-table-markdown

开源软件地址(OpenSource Url):

https://github.com/vokal/pg-table-markdown

开源编程语言(OpenSource Language):

Python 100.0%

开源软件介绍(OpenSource Introduction):

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

Column Type Default Nullable
id integer nextval('app_users_id_seq'::regclass) NO
email character varying None NO
password character varying None YES
is_active boolean true YES
is_admin boolean false YES

Run tests with Docker Compose

docker-compose run cli nosetests -v



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap