Papyri is a Python tool designed to decouple documentation generation from rendering by parsing library docstrings into a portable intermediate representation that can be built once and rendered many times across different projects. The project is currently in active development as of 2026, with its core generation and upload pipeline functional on Python 3.14, and a local web viewer available under the viewer directory.
The project addresses two fundamental problems in Python documentation infrastructure. First, it solves the coupling problem inherent in Sphinx workflows, where parsing documentation and rendering to HTML occur simultaneously. This coupling forces full rebuilds whenever HTML templates need updates for accessibility or other reasons, requires the rendering environment to match the build environment, and produces no reusable artifact between what a project documents and how it appears. Papyri separates these concerns into two distinct stages: IR generation via papyri gen, which runs per project in the library maintainer's CI environment and produces a self-contained DocBundle, and rendering, which is a separate stateless process that reads DocBundles and produces HTML without requiring access to the original source.
Second, Papyri addresses documentation fragmentation across domains. Currently, every Python library hosts documentation on separate subdomains, making cross-project searching difficult, complicating cross-package link navigation, and creating maintenance challenges when upstream APIs change. Papyri's model, inspired by conda-forge, centralizes documentation by having library maintainers run papyri gen in their CI and upload resulting DocBundles to a central service. This service ingests bundles into a cross-linked graph and serves them from one location with bidirectional cross-links between packages.
The architecture consists of three main components. The generation stage walks a project's documented API and emits a DocBundle containing per-object JSON or CBOR files, a manifest, table of contents, assets, documentation, and examples. During generation, normalization steps run including type inference on Examples sections, parsing of See Also sections into structured lists, resolution of local references to fully-qualified names, and partial implementation of example execution to capture output images. The ingestion stage, implemented in TypeScript under the ingest directory, receives uploaded DocBundles at the viewer's API endpoint and merges each bundle into a local SQLite graph, updating forward and backward references across all ingested bundles. The viewer, built with Astro, React, and TypeScript, reads the SQLite graph and per-bundle CBOR blobs to provide the primary interface for browsing generated documentation locally during development.
According to GitGenius activity tracking, the most active contributors include Carreau with four recorded events, followed by Awaneesh03 and melissawm with two events each. Issue and pull request response latency shows a median of zero hours with a mean of 11801.2 hours across tracked items. The most active issue labels are documentation with two occurrences, upstream with one, and planning with one. The repository overlaps with contributors from ipython/ipython, scipy/scipy, and numpy/numpy, indicating integration within the broader scientific Python ecosystem.
The project requires Python 3.14 and is driven by pyproject.toml configuration. Development installation from a clone is recommended over the PyPI version, which is outdated at 0.0.8 from March 2024. RST parsing uses py-tree-sitter-rst built on tree-sitter 0.24 or later. The project uses fully qualified names with colon separators, such as numpy:einsum, to avoid ambiguity when packages re-export names from submodules. Contributing focuses on IR correctness, cross-link resolution, and IR schema stabilization, with the viewer application maintaining its own separate milestone tracking.