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/python-sdk

Generate documentation for specific modules:

mdxify mypackage.core mypackage.utils --output-dir docs/python-sdk

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/python-sdk)
  • --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.7.tar.gz (37.6 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.7-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mdxify-0.2.7.tar.gz
  • Upload date:
  • Size: 37.6 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.7.tar.gz
Algorithm Hash digest
SHA256 d7cdca01d156077a62e83f66a80687b76e75cf8cd437d597c7e8471e79bff9b5
MD5 9747c2b85d6fd9ab682f448ff1ddf056
BLAKE2b-256 8d64647351657265272150d60c4bcd96da78ba1c1bb76e3f95d367e3cc7398a4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mdxify-0.2.7-py3-none-any.whl
  • Upload date:
  • Size: 12.8 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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 c7476caa4e92bf3e8b6133bcad9179e3b3c8bafafc4329558692b102f545cc02
MD5 3a9f00e6d5f2c8825ce2ff86498e9595
BLAKE2b-256 ec71f2523d5c25f9ea97db3095f753f5676cf6391afe8011e91abea290bd6a53

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