Odoc (Odocxify) is a Markdown API documentation generator for Python projects. It works from static analysis by default and can optionally use Gemini to draft missing docstrings.
- Static analysis for modules, functions, async functions, classes, methods, decorators, return types, constants, and class attributes.
- Markdown output that preserves package directory structure and includes an API index.
- Optional AI mode for missing docstrings with
--ai. - Configurable excludes via
pyproject.toml. - Built for MkDocs, but the generated Markdown works anywhere.
pip install odocxifyOr using Poetry:
poetry add odocxifyGenerate docs for the current project:
odoc .This writes Markdown files to docs/api.
Useful options:
odoc --help
odoc src/ --out docs/api --clean
odoc src/ --private
odoc src/ --aiAI mode is optional. To use it, create a .env file or environment variable:
GOOGLE_API_KEY=your_gemini_api_keyConfigure odoc in pyproject.toml:
[tool.odoc]
exclude = [
"tests/*",
"setup.py",
"docs/*"
]MIT