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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mdxify-0.2.6.tar.gz.
File metadata
- Download URL: mdxify-0.2.6.tar.gz
- Upload date:
- Size: 34.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70606c8a069cf930510f20e52a6262c69ad3fe5bbf2adb116c70d807d838057b
|
|
| MD5 |
1354761712446e7374bdfb50549d9ace
|
|
| BLAKE2b-256 |
066e25d0f790c2142bd006e4f4b100f983719a3ea5a7d68835d067db2f30e227
|
File details
Details for the file mdxify-0.2.6-py3-none-any.whl.
File metadata
- Download URL: mdxify-0.2.6-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7ac084276690260cf9b9d273ce20691a2b14d55cea55192d5ebc59e18abe87d
|
|
| MD5 |
bf047103375d6f4c00bb3c6f8f650fb0
|
|
| BLAKE2b-256 |
16a754a74c1cab1b3ba1797cc8171b7434e271f31858864cb5629cd9adaf5295
|