{"id":14065595,"url":"https://github.com/VEINHORN/pgdocs","last_synced_at":"2025-07-29T20:33:29.780Z","repository":{"id":77666644,"uuid":"170988944","full_name":"VEINHORN/pgdocs","owner":"VEINHORN","description":"Generate well formed docs from your database metadata","archived":false,"fork":false,"pushed_at":"2019-04-20T14:20:41.000Z","size":11387,"stargazers_count":2,"open_issues_count":11,"forks_count":0,"subscribers_count":3,"default_branch":"dev","last_synced_at":"2024-12-04T04:33:48.725Z","etag":null,"topics":["postgresql","psql","python3"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/VEINHORN.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-02-16T10:04:05.000Z","updated_at":"2022-10-10T07:27:39.000Z","dependencies_parsed_at":"2023-02-27T15:15:33.829Z","dependency_job_id":null,"html_url":"https://github.com/VEINHORN/pgdocs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/VEINHORN/pgdocs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VEINHORN%2Fpgdocs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VEINHORN%2Fpgdocs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VEINHORN%2Fpgdocs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VEINHORN%2Fpgdocs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VEINHORN","download_url":"https://codeload.github.com/VEINHORN/pgdocs/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VEINHORN%2Fpgdocs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267754873,"owners_count":24139435,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["postgresql","psql","python3"],"created_at":"2024-08-13T07:04:35.068Z","updated_at":"2025-07-29T20:33:28.975Z","avatar_url":"https://github.com/VEINHORN.png","language":"Python","readme":"![logo](logo.png)\n\n`pgdocs` utility helps you to generate well formed documentation based on your PostgreSQL meta data. You can create docs in different formats: _Markdown_, _Excel_, _PDF_.\n\n## Features\n\n- Generate db documentation based on metadata\n- Supported output formats: HTML, PDF, _Markdown_, MkDocs\n- Enrich existing metadata using CLI commands\n- Show schema/table/column description using CLI commands\n\n## Prerequisites\n\nYou need some software to be installed:\n\n- _Python 3_ should be installed\n- You need to have `psql` utility in your **PATH**\n- Installed _Java_ **if you're going to use SchemaSpy output format**\n\n## Usage\n\nTo generate docs just type below command:\n\n```shell\npython pgdocs.py create\n```\n\nBy default _Markdown_ format will be used. You can specify any of supported formats (see [Formats](#formats) for more details). Database docs will be created in working directory.\n\n### Commands\n\nThere are a bunch of commands supported by `pgdocs` utility.\n\n#### Create\n\nIf you want generate docs for your database run below command:\n\n```shell\npython pgdocs.py create\n```\n\nYou can also run `pgdocs` using Docker, see details below.\n\n#### Enrich\n\nWith `enrich` command you can add/update schema/table/column description.\n\n##### Long `enrich` command\n\nUpdate table description:\n\n```shell\npython3 pgdocs/pgdocs.py enrich -h localhost -p 5432 -s public -d store_db -t client --description \"some table description here\"\n```\n\nUpdate column description:\n\n```shell\npython3 pgdocs/pgdocs.py enrich -h localhost -p 5432 -s public -d store_db -t client -c id --description \"some column description here\"\n```\n\n##### Short `enrich` command\n\nIf you are a little bit tired of using long `enrich` command version, you can use simplified version:\n\n```shell\npgdocs enrich -p \"schema.table.column\" -d \"some database object description here\"\n```\n\nWith `-p` option you can specify _schema_, _table_, _column_ in format like `schema.table.column`.\n\n#### Backup\n\nWhen you just need to fetch database metadata for backup or any other purposes you can use `backup` command:\n\n```shell\npython3 pgdocs.py backup\n```\n\n#### Show\n\nIf you want to dispaly db object description, you can use `show` command.\n\nShow table description in `public` schema.\n\n```shell\npython3 pgdocs/pgdocs.py show -h localhost -p 5432 -d store_db -s public -t client\n```\n\nYou can also specify any other schema.\n\n### Docker\n\nTo simplify running doc generation you can use `Docker` image. To run just run below command:\n\n```shell\ndocker run -it pgdocs:latest\n```\n\n#### Example\n\nTo run Docker example just run:\n\n```shell\ndocker stack deploy -c examples/docker-compose.yml pgdocs-example\n```\n\n### Options\n\n```\n-h, --host     Database host\n-p, --port     Database port\n-d, --database Database name\n-f, --format   Format in which documentation will be generated\n-o, --output   Output folder for generated documentation\n```\n\n#### Configuration\n\nYou can specify database host, port and name using command line options:\n\n```shell\npython pgdocs.py create -h localhost -p 5432 -d store_db\n```\n\nIf you'll not specify this options `pgdocs` will try to generate docs from `localhost:5432`.\n\n#### Formats\n\n`pgdocs` can generate database documentation in different formats: _Markdown_, _Excel_, _PDF_. You can also deploy documentation in _MkDocs_ format using _Docker_.\n\n##### Markdown\n\nTo generate docs in Markdown format:\n\n```shell\npython pgdocs.py create -f markdown\n```\n\n##### HTML\n\nTo generate docs in HTML format just type:\n\n```shell\npython pgdocs.py create -f html\n```\n\n##### PDF\n\nTo generate docs in _PDF_ format just type below command:\n\n```shell\npython pgdocs.py create -f pdf\n```\n\n##### MkDocs\n\nTo generate docs in _MkDocs_ format run below command:\n\n```shell\npython pgdocs.py create -f mkdocs\n```\n\n##### SchemaSpy\n\nYou can also generate documentation in \"SchemaSpy\" format (all required dependencies are already included):\n\n```shell\npython3 pgdocs/pgdocs.py create -f schemaspy -h localhost -p 5432 -d store_db -o gen-docs\n```\n\n#### Output\n\nYou can specify output folder for generated documentation:\n\n```shell\npython pgdocs.py create -o gen\n```\n\nand you end up with created docs in `gen/docs.md`.\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FVEINHORN%2Fpgdocs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FVEINHORN%2Fpgdocs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FVEINHORN%2Fpgdocs/lists"}