Modern Python Projects Transcripts
Chapter: Course conclusion and review
Lecture: Documentation
Login or
purchase this course
to watch this video and the rest of the course contents.
0:00
When you are ready to share your Python project with the rest of the world, you need to find a way to tell others how to use it.
0:08
So you will need to write some documentation. And the best way to write documentation in Python is to use the library,
0:15
called Sphinx. Sphinx will generate the documentation from the RST files, and then you can display them in either the HTML format,
0:24
in Latex and in a lot of other output formats. One of the best features of Sphinx is that it comes with a bunch of plugins
0:31
that makes writing documentation much easier. You can automatically extract the doc strings from your code. You can add links to the source code,
0:40
and you can even generate the CLI documentation when you are using libraries like Click. When you are ready to publish your documentation,
0:48
you can visit the Read the Docs Website and host it there. And if you want to use a different tool,
0:54
than Sphinx. There is also MKdocs that works very well and swagger or redoc that will automatically generate the documentation for your RestAPI.