Senon Docs
Documentation drifts because nothing enforces it. Senon Docs generates a complete API reference from any Python project and gives it a passing or failing state, so coverage can be gated in CI the way tests are.
Written in pure Python and pointed at any Python project, producing a full API reference in six formats, with coverage thresholds that fail a CI build when documentation quality regresses.
Core capabilities
- Document any Python project from one command, with no scaffold or config file
- Resolve dynamically generated API surfaces, including those backed by C and Rust extensions
- Run true parallel execution without locking down the global interpreter
- Identify available workers and set the worker count, or detect it automatically
- Fail a build when error rate, description coverage, or example coverage crosses a threshold
- Produce Markdown, JSON, YAML, TOML, HTML, and CSV from a single pass
- Group symbols by inferred behaviour rather than by module path
- Validate its own output, checking that every generated anchor resolves
Why it exists
Documentation rots because nothing fails when it does. A test suite has a passing state; a reference page with half its functions undescribed has no state at all, so the gap widens quietly until the docs are worse than having none. Senon Docs generates the reference and then returns a verdict on it: error rate, description coverage, and example coverage measured against thresholds you set, with a non-zero exit when they are missed.
Documentation with a passing state
In CI mode the run is deterministic: fixed timestamps and stable ordering, so a documentation diff carries meaning. Set a minimum description coverage of 90 percent and the build fails at 89. Extraction failures are recorded as data rather than swallowed, which is what makes the error-rate gate honest. A symbol that could not be resolved is counted, flagged, and still emitted as a partial entry instead of quietly vanishing from the output.
What it extracts
The engine follows a compiler architecture: a front end that resolves symbols, an intermediate representation every output format is rendered from, and a back end per format. It inspects live objects rather than reading files, which is what lets it document API surfaces that exist only once a package is loaded: code-generated operations, lazy-loaded modules, decorator-registered exports, and namespaces backed by C and Rust extensions. TensorFlow is the hard case of that kind, and it resolves in full across every submodule. For each symbol the signature is reconstructed, coroutine return types unwrapped to what an await actually yields, and returns, raises, and examples lifted out of free-form docstring prose into typed fields. Machine-learning algorithms classify each symbol by behaviour while AST traversal scores its complexity, weighting control flow, nesting, comprehensions, and exception handling.
Parallelism without the interpreter lock
The parallelism is real rather than nominal. The engine identifies the workers available to it and either takes a worker count or detects one, then executes without serialising behind the global interpreter lock. On current Python it uses free-threaded execution directly; on older interpreters a purpose-built architecture delivers the same true parallelism, keeping the tool compatible from 3.10 through the latest release. Everything is written in pure Python, so there is no native build step and nothing to compile before it runs.
At scale
Throughput averaged 2,858 functions per second. A single run of one internal test included 66 libraries, among them SymPy, mpmath, PySpark, Django, Flask, and the whole of TensorFlow across its twenty submodules. It resolved 52,549 symbols into a 4.2-million-line Markdown reference. That run finished in five to eight minutes, and almost none of it was analysis: scanning every library and submodule took seconds, while the rest went to disk, writing the reference to NVMe as correctly formatted Markdown alongside the other output formats, which ran to millions of lines of their own. Inside Senon Solutions it is not a side project: every system with a Python component has that part of its documentation generated by Senon Docs.