sphinx

5 posts tagged “sphinx”.

  1. 2025
  2. Format code examples in documentation with blacken-docs

    I decided to enforce that all code examples in the Datasette documentation be formatted using Black. Here's issue 1718 where I researched the options for doing this. I found the blacken-docs tool.

    1 min read
  3. Using sphinx.ext.extlinks for issue links

    Datasette's release notes are formatted using Sphinx. Almost every bullet point links to the corresponding GitHub issue, so they were full of lines that look like this: I noticed that the aspw…

    1 min read
  4. Build the official Python documentation locally

    First, checkout the cpython repo: $ git clone git@github.com:python/cpython cd into the directory: $ cd cpython/Doc To get a virtual environment with Sphinx and other required tools, run like this: $…

    1 min read
  5. 2024
  6. Adding Sphinx autodoc to a project, and configuring Read The Docs to build it

    I built a new API reference page today for , using the Sphinx autodoc extension to extract docstrings from the code and use them to build a full class reference.

    3 min read
  7. 2023
  8. literalinclude with markers for showing code in documentation

    I wanted to include some example Python tests in the Datasette documentation - but since they were tests, I also wanted to execute them as part of my test suite to make sure they worked correctly.

    1 min read