Skip to main content

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

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.8.0.tar.gz (10.8 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.8.0-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dbgear_doc-0.8.0.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.12.14 Linux/6.6.87.2-microsoft-standard-WSL2

File hashes

Hashes for dbgear_doc-0.8.0.tar.gz
Algorithm Hash digest
SHA256 5bb3ecc022851d5c0256d5f730a781f7747ae84a781741a119018cc9806241a9
MD5 f2b4d97cd1939acd36802a2febc70838
BLAKE2b-256 20a0c18985877e5b96e87a225224e4dcd54968a60801744c58f8d404c0cb5bd9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dbgear_doc-0.8.0-py3-none-any.whl
  • Upload date:
  • Size: 13.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.12.14 Linux/6.6.87.2-microsoft-standard-WSL2

File hashes

Hashes for dbgear_doc-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0254d0c8df93678190706409269258fb72c8b41ef8afe146aafa5565594cd00b
MD5 6349974373f41726081509072a7f7c73
BLAKE2b-256 23c073fe982327b76f8d40c6735c256b34e1e8b3d8c1d5ab6c3b7424448ca8a3

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.8.0 This release

2 files

0.7.4

2 files

0.7.3

2 files

0.7.2

2 files

0.7.1

2 files

0.7.0

2 files

0.6.1

2 files

0.6.0

2 files

0.5.0

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page