DreamLake

Python Autodoc

autodoc-py turns a Python package into Dockit API reference pages. It reads source files with Python's abstract syntax tree, then writes MDX pages with navigation metadata, signatures, docstrings, and links to source.

Your package does not run during generation. You can document a release without installing its application dependencies or triggering startup code.

From source to reference

bash
python -m pip install dreamlake-autodoc-py==0.2.0a1

autodoc-py src/my_package \
  --module my_package \
  --output docs/pages/api \
  --section 'Python API'

Dockit discovers the generated +Page.mdx files through its existing page glob. They participate in the sidebar, search, table of contents, and Markdown exports alongside your hand-written guides.

What it documents

Python sourceGenerated reference
ModulesModule docstrings, grouped topic pages, or a page per public module
Classes and functionsSignatures, docstrings, and source links
Class membersConstructors, methods, annotated attributes, and assigned attributes
Local importsLinked indexes for explicit and star re-exports
Local base classesInherited member lists, with overridden names suppressed
Literal __all__Filtering of locally defined public classes and functions

Private modules and tests are skipped. A generated-file manifest records the pages the tool owns, so removing a Python module removes its generated page without deleting unrelated hand-written pages.

Generator version

The badge identifies the released generator version pinned by this workspace. The first PyPI prerelease is 0.2.0a1; a release selector will follow when multiple documentation builds are available. The generator source revision and the version of the Python package being documented are independent.

Static analysis boundaries

The generator documents declarations in source. It does not resolve dynamically created members, runtime signatures, external-package inheritance or re-exports, or module-qualified base expressions. Local inheritance follows base declaration order; it does not implement Python's complete C3 method resolution order.

Docstrings retain their content, but Sphinx roles and directives are not executed. Keep earlier Sphinx builds if exact historical rendering matters. Use a Python interpreter that can parse the syntax in the release you are documenting; the generator itself requires Python 3.10 or later.