Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Sphinx Autodoc - Automated API Documentation

EuroPython Conference via YouTube

Overview

Learn how to automate API documentation using Sphinx autodoc in this comprehensive conference talk from EuroPython 2015. Explore the powerful features of Sphinx, including autodoc, autosummary, coverage, and doctest extensions, to streamline your documentation process. Discover how to generate well-formatted API docs from Python docstrings, automatically list APIs, identify undocumented functions, and verify the accuracy of code examples. Follow a step-by-step procedure to create clear, maintainable documentation that includes Python snippets and improves your motivation for writing docs. Gain valuable insights into Sphinx installation, project setup, and best practices for documenting Python libraries. Perfect for programmers struggling with documentation and library authors seeking to automate their API documentation workflow.

Syllabus

Intro
What is the reason you do not write docstrings.
What is Sphinx?
The history of Sphinx (short ver.)
Sphinx Before and After
Sphinx extensions (built-in)
library code example
How to install Sphinx
How to start a Sphinx project
Current files structure
setup autodoc extension
Add automodule directive to your doc
How does it work?
Danger code
execution guard on import
"info field lists" for arguments
Code example in a docstring
Syntax highlighted output
setup doctest extension
Result of "make doctest"
Individual pages for each modules
setup autosummary extension
Replace automodule with autosummary
Output of autosummary
setup coverage extension
Why don't you write docstrings?
Options for autodoc
SV sphinxcontrib-httpdomain 3rd party ext
Translation into other languages

Taught by

EuroPython Conference

Reviews

Start your review of Sphinx Autodoc - Automated API Documentation

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.