--- id: sphinx-codeautolink version: "0.19.0" license: unclear license_treatment: unclear maintenance: active --- # sphinx-codeautolink — Automatic links from code examples to reference documentation. License: unclear · Maintenance: active · Downloads: 84.2K/mo ## What it is and what it does sphinx-codeautolink is a Sphinx extension that automatically converts code elements in documentation examples into clickable links pointing to their reference documentation. It works by parsing valid Python code in your examples and inserting hyperlinks to the corresponding API docs for each function, class, or module mentioned. The extension requires minimal setup—just add it to your Sphinx conf.py extensions list—and assumes your code examples are already valid Python. It depends on sphinx and beautifulsoup4 to parse and modify the rendered HTML. The project is in active development (Beta status) and supports Python 3.10 through 3.14, with recent releases and steady maintenance. Use it for: - Automatically link function and class names in code examples to their API reference documentation - Make library usage examples in Sphinx docs interactive and navigable without manual link markup - Reduce documentation maintenance by eliminating hand-written cross-reference links in code blocks - Improve reader experience by enabling one-click navigation from example code to detailed API docs ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. sphinx-codeautolink automatically converts code examples in Sphinx documentation into clickable links that point to the corresponding reference documentation for each code element. Yes, if you maintain Sphinx documentation with code examples and want readers to navigate easily to API references. Low install friction, active maintenance, and no known vulnerabilities make it a safe choice. The Beta status and recommendation to pin versions suggest treating it as a stable but still-evolving tool rather than a mature library. ## Install pip install sphinx-codeautolink uv add sphinx-codeautolink poetry add sphinx-codeautolink ## Installing sphinx-codeautolink Before you install: Low install friction; depends only on sphinx and beautifulsoup4. Actively maintained with a recent release (16 days old) and steady repository activity. Early development status (Beta) suggests version pinning is recommended. Quickstart: pip install sphinx-codeautolink # In conf.py: extensions = [ "sphinx_codeautolink", ] Requires Python 3.10 or later; sphinx and beautifulsoup4 must be installed. Verify before relying: - Whether the package handles all Python syntax constructs or only a subset of common patterns - Performance impact on large documentation builds with many code examples - Compatibility with Sphinx themes other than the default ## Package facts - License: not declared (unclear) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 84.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags sphinx code example linking, automatic documentation cross-references, clickable code snippets sphinx, sphinx extension code linking, documentation code element references, sphinx code to docs linking, interactive code examples sphinx, sphinx-extension, documentation-tooling [View on SkillFed](https://skillfed.io/packages/sphinx-codeautolink) · [View on PyPI](https://pypi.org/project/sphinx-codeautolink/)