Skip to main content

An MkDocs plugin to generate documentation from SQLAlchemy models.

Project description

mkdocs-sqlalchemy-plugin

tests documentation codecov PyPI - Python Version PyPI PyPI - Downloads

MkDocs plugin to generate docs from SQLAlchemy models.

Features

  • Automatic Documentation: Generates tables documenting your SQLAlchemy models.
  • Customizable: Configure which fields to show, table styling, and more.
  • Filtering: Include or exclude specific tables.
  • SQL DDL: Optionally display the SQL CREATE TABLE statements.
  • Schema Support: Group tables by schema.

Installation

Install the plugin using pip:

pip install mkdocs-sqlalchemy-plugin

Quick Start

  1. Configure mkdocs.yml:

    Add the plugin to your mkdocs.yml configuration file. You must specify the base_class which is the import path to your SQLAlchemy DeclarativeBase.

    plugins:
      - sqlalchemy:
          base_class: "my_app.models.Base"
          app_path: "src"
    
  2. Add to Markdown:

    In your markdown files, use the sqlalchemy tag where you want the documentation to appear.

    {% sqlalchemy %}
    
  3. Build Docs:

    Run mkdocs serve to see your documentation.

Configuration

The plugin offers extensive configuration options to tailor the output to your needs. See the Configuration Options page for a full reference.

Usage

The {% sqlalchemy %} tag is powerful and supports local overrides. See the Tag Usage page for details.

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

mkdocs_sqlalchemy_plugin-0.1.0.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

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

mkdocs_sqlalchemy_plugin-0.1.0-py3-none-any.whl (14.5 kB view details)

Uploaded Python 3

File details

Details for the file mkdocs_sqlalchemy_plugin-0.1.0.tar.gz.

File metadata

  • Download URL: mkdocs_sqlalchemy_plugin-0.1.0.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for mkdocs_sqlalchemy_plugin-0.1.0.tar.gz
Algorithm Hash digest
SHA256 77fbe0ca8d3bfe9cc5ed201f2d2d3cfe9ce991d241f278c3b02408da7e59844a
MD5 99836c764e31bf023bc80b40264022aa
BLAKE2b-256 a7db8e28516d948712cb0910b6b9fb4be033f929cb60c6b8012f9600e8477e95

See more details on using hashes here.

File details

Details for the file mkdocs_sqlalchemy_plugin-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mkdocs_sqlalchemy_plugin-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for mkdocs_sqlalchemy_plugin-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 818471afccfda46282a1ea46a149b173ccbfe33685b591b9a41cd929fdf5a3bc
MD5 03f08ec136dfa6a56162572f103bde9a
BLAKE2b-256 9abcb0d69d72fc4da3f7ab3ed4d0dfd5e66a4a5b723d4f0261f52b7ed143f847

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