Skip to main content

Documentation generator plugin for DBGear

Project description

dbgear-doc

Documentation generator plugin for DBGear.

Overview

dbgear-doc generates Markdown documentation from DBGear database schema definitions. It provides:

  • Automatic documentation generation from schema.yaml files
  • Table structure documentation with columns, types, and descriptions
  • Index and foreign key relationship documentation
  • Schema-level overview pages

Installation

pip install dbgear-doc

Or with Poetry:

poetry add dbgear-doc

Usage

Once installed, the doc subcommand becomes available in the dbgear CLI:

# Generate documentation (outputs to ./docs by default)
dbgear --project path/to/project doc

# Specify output directory
dbgear --project path/to/project doc -o ./documentation

Programmatic Usage

from dbgear_doc import DocumentGenerator, generate_docs
from dbgear.models.schema import SchemaManager
from pathlib import Path

# Simple usage
generate_docs("schema.yaml", "./docs")

# Advanced usage with SchemaManager
schema_manager = SchemaManager.load("schema.yaml")
generator = DocumentGenerator(schema_manager)
generated_files = generator.generate(Path("./docs"))

Output Structure

docs/
├── index.md              # Main index with schema list
└── {schema_name}/
    ├── README.md         # Schema overview with table list
    └── {table_name}.md   # Individual table documentation

Generated Documentation

Each table documentation includes:

  • Description: Table notes/comments from schema
  • Columns: Column name, type, nullable, default, and description
  • Primary Key: Primary key columns
  • Indexes: Index definitions with columns and uniqueness
  • Foreign Keys: Foreign key constraints with references

License

MIT License

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

dbgear_doc-0.7.0.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dbgear_doc-0.7.0-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

Details for the file dbgear_doc-0.7.0.tar.gz.

File metadata

  • Download URL: dbgear_doc-0.7.0.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.12.3 Linux/5.15.136-tegra

File hashes

Hashes for dbgear_doc-0.7.0.tar.gz
Algorithm Hash digest
SHA256 f4b2b36fa1c4df8addc626e88a09d8bb96eadbeb34b375c02b0caa669107c9a5
MD5 67b12d16962ec9b0e91fec564fdb1f4f
BLAKE2b-256 41811866f3fc3fdabcab613163bfda48edd7c3afb36796b24edcb60dee7d1f09

See more details on using hashes here.

File details

Details for the file dbgear_doc-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: dbgear_doc-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 11.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.12.3 Linux/5.15.136-tegra

File hashes

Hashes for dbgear_doc-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ade47e7e87d6d087c803a1a81d27dec43d8ffb8a291c490a328d2c09aaab4a6a
MD5 33d77a954947fb74527b55f6a75a9ee2
BLAKE2b-256 203a3dd32b8bee58fd3c35c0de6e19d84daf517cb7c4f85c9d6bf98195d9a0f9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page