Skip to main content

Python repositories

Documentation for Python codebases, kept current from the code

Sphinx and pdoc turn docstrings into API reference. Moxie Docs covers the rest: how the project is laid out, which routes it serves, what it depends on, how to run its checks, and the conventions a new engineer or coding agent should follow - re-checked every time the code merges.

Quick Answer: Moxie Docs reads Python repositories structurally, not just as text. It captures top-level and decorated functions and classes per module (honoring __all__), resolves relative and package imports (including src layouts), extracts FastAPI, Flask, Django, DRF, and Starlette route paths, reads dependencies from pyproject.toml, requirements files, setup.cfg, and Pipfile, and detects the project's real check commands such as uv run pytest or poetry run ruff check. It uses that to write architecture and convention docs and keep them current on every merge.
  • Structure, not just text. Functions, classes, and imports are read per module and linked into an import graph.
  • Your stack, detected. uv, Poetry, PDM, Hatch, pytest, ruff, mypy, tox, and nox are picked up from the repo.
  • Checked on merge. Docs that cite a changed module are re-checked before they drift.

What you get

What Moxie Docs reads in a Python repo

API routes

FastAPI and Flask decorators on any router or blueprint (with same-file prefixes), Django path() and re_path(), DRF router.register, and Starlette Route.

Import graph

Relative imports, dotted package imports, __init__.py packages, and src/ layouts resolve to real files, so PR checks know which modules depend on a change.

Dependencies and conventions

Libraries come from pyproject.toml (PEP 621, Poetry, uv groups), requirements*.txt, setup.cfg, and Pipfile, matched to imports like yaml to PyYAML.

Real check commands

Agents get the commands your repo actually uses - uv run pytest, poetry run ruff check ., tox, nox, or Makefile targets - instead of a guess.

Tests recognized

test_*.py, *_test.py, tests/ folders, and conftest.py count as tests, not as undocumented source.

Symbols with context

Top-level and decorated functions and classes are captured per module, and __all__ decides what counts as public.

How it works

From a Python repo to current docs

  1. 01

    Connect GitHub

    Install the app on the Python repositories you want covered. Virtualenvs, site-packages, __pycache__, and egg-info folders are skipped.

  2. 02

    First index

    Moxie Docs reads the source, resolves imports, reads manifests and tool config, and writes the architecture, conventions, API surface, and setup pages.

  3. 03

    Agents read it

    Cursor, Claude Code, and Codex get the same docs, conventions, and check commands over MCP before they edit.

  4. 04

    Merges keep it true

    Every merge re-checks the pages that cite changed files. Fixes arrive as docs-only PRs your team reviews.

Scope

Where Moxie Docs fits next to Sphinx, MkDocs, and pdoc

Python already has good tools for API reference. Moxie Docs does not replace them, and it is honest about the overlap.

Sphinx with autodoc, mkdocstrings, and pdoc render a page per module from your docstrings. That is the right tool for a public library's reference. What they do not do is explain how an application fits together, notice when a merged change made a guide wrong, or tell a coding agent how your team writes code.

Moxie Docs writes that descriptive layer from the repository and keeps it current. Many teams run both: a docstring reference site for the public API, and Moxie Docs for architecture, conventions, setup, and agent context. Existing .rst and Markdown docs are indexed and checked for drift, never overwritten.

  • Docstring generators: per-symbol API reference, rebuilt when you run the build.
  • Moxie Docs: architecture, flows, routes, conventions, and setup, re-checked on every merge.
  • Not covered: rendering a full per-method API reference site. Keep Sphinx or pdoc for that.

At a glance

Python docs tools at a glance

Written from

Sphinx / pdoc

Docstrings

Wiki or README

Whoever last edited it

Moxie Docs

Source, manifests, and tool config

Architecture and flows

Sphinx / pdoc

Hand-written pages

Wiki or README

Hand-written pages

Moxie Docs

Generated and cited to source

Notices stale docs

Sphinx / pdoc

No

Wiki or README

No

Moxie Docs

On every merge

Per-symbol API reference

Sphinx / pdoc

Yes

Wiki or README

No

Moxie Docs

No - summaries, not a reference site

Readable by coding agents

Sphinx / pdoc

As HTML

Wiki or README

Copy and paste

Moxie Docs

Served over MCP

Get started

Point Moxie Docs at a Python repository

The first index reads your routes, dependencies, and tooling and writes the architecture, conventions, and setup docs. Free on one repo, no card required.