Sphinx–Python Docstring Package¶
What is Sphinx¶
Sphinx is written in Python and supports Python 3.6+. It builds upon the shoulders of many third-party libraries such as Docutils and Jinja, which are installed when Sphinx is installed.
Text Formatting¶
List and Number¶
Use
*
for ListUse
#.
for Numbered List
Admonitions¶
Caution
This is a caution box.
Danger
This is a danger box.
Tip
This is a tip box.
Note
This is a note box.
Codes¶
Simple
Note
Use
::
to note the following sections are codes.- Example:
Here’s a simple sample to input codes, type in:
#Write your codes Here #i.e. Python print("Hello Sphinx!")
Specific
Note
Use .. code-block:: python to note the following sections are python codes.
Example: