Skip to main content

Generate MDX API documentation from Python modules

Project description

mdxify

Generate MDX API documentation from Python modules with automatic navigation structure.

Installation

pip install mdxify

Usage

Generate documentation for all modules in a package:

mdxify --all --root-module mypackage --output-dir docs/api

Generate documentation for specific modules:

mdxify mypackage.core mypackage.utils --output-dir docs/api

Options

  • modules: Specific modules to document
  • --all: Generate documentation for all modules under the root module
  • --root-module: Root module to generate docs for (required when using --all)
  • --output-dir: Output directory for generated MDX files (default: docs/api)
  • --update-nav/--no-update-nav: Update docs.json navigation (default: True)

Navigation Updates

To use automatic navigation updates, add a placeholder in your docs.json:

{
  "navigation": [
    {
      "group": "API Reference",
      "pages": [
        {"$mdxify": "generated"}
      ]
    }
  ]
}

mdxify will replace {"$mdxify": "generated"} with the generated module structure.

Features

  • Fast AST-based parsing - No module imports required
  • MDX output - Compatible with modern documentation frameworks
  • Automatic navigation - Generates hierarchical navigation structure
  • Google-style docstrings - Formats docstrings using Griffe
  • Smart filtering - Excludes private modules and known test patterns

Development

# Install development dependencies
uv sync

# Run tests
uv run pytest

# Run type checking
uv run ty check

# Run linting
uv run ruff check src/ tests/

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

mdxify-0.2.1.tar.gz (34.1 kB view details)

Uploaded Source

Built Distribution

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

mdxify-0.2.1-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

Details for the file mdxify-0.2.1.tar.gz.

File metadata

  • Download URL: mdxify-0.2.1.tar.gz
  • Upload date:
  • Size: 34.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for mdxify-0.2.1.tar.gz
Algorithm Hash digest
SHA256 54c3da8b99fba6e84ff167331b682e985a583e768ffaa49af0800aec3a92e2c6
MD5 f1edb01e5278708c8bec9c9259cfb2a6
BLAKE2b-256 7c0f7646fcae7737d46d2c764df8da75c975924879435706022553c70819d1bd

See more details on using hashes here.

File details

Details for the file mdxify-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: mdxify-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 12.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for mdxify-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 23e77f9d1f31f7e77f083e674d9c08f773f891d8e4f773240d84dc0938d44f3c
MD5 240f9ceed57964b628aaa8d8df80b95c
BLAKE2b-256 e70b28fbac35a3936cf90fb6e6a5cf9c35c191bb393f7611f244e49c69f0dfe5

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