Sphinx is a great tool for documenting your Python projects. With it, you can incorporate pydoc comments from your code into your docs and use the reStructuredText (RST) markup language to structure and style your document.
Once you’ve perfected your project documentation, you’ll probably want to host it somewhere. That’s where Read the Docs comes in, offering integration with GitHub, GitLab, and Bitbucket to automatically pull new documentation sources from your repositories and build their Sphinx sources.
In this video course, you’ve learned how to:
- Write your documentation with Sphinx
- Structure and style your document with RST syntax
- Incorporate your pydoc comments into your documentation
- Host your documentation on Read the Docs
With these skills, you’ll be able to write and maintain effective documentation for your Python projects.
To learn more about Sphinx, check out the following documentation:
You can also refer to the following cheat sheets:
- Sphinx RST Cheat Sheet for Python Docstrings
- Documenting Your Project Using Sphinx
- Restructured Text (reST) and Sphinx CheatSheet
For more information on Read the Docs, you’ll find the following resources useful:
- Read the Docs documentation
- Read the Docs tutorial
- Sphinx, MyST, and Python Docs in 2022 - Talk Python
Finally, to turbocharge your documentation workflow, you might enjoy working with ChatGPT.
Congratulations, you made it to the end of the course! What’s your #1 takeaway or favorite thing you learned? How are you going to put your newfound skills to use? Leave a comment in the discussion section and let us know.
Alain Rouleau on March 22, 2023
Great introduction to Sphinx and the whole documentation thing.
Very informative, thanks a lot!