
Create and save a Python program named doxygen_example.py within this src directory with the code shown below. This is where we will place our source code. Create a src directory under the project directory and go into that directory as well. constants, variables, functions, classes, modules, etc.) that are common in Python programs.Ĭreate a project directory named MyDoxygenExample and go into that directory. It contains various types of elements (e.g.

They merely provide an example of how to comment your source code so that it can be properly parsed by the Doxygen utility.

This program, along with the associated module, are not meant to actually do anything useful. We will create a main program, named doxygen_example.py, and a module, named sensors.py, that will be used by the program. In order to generate source code based documentation using Doxygen, we first need to have source code for it to use. Test that it is installed correctly by executing the following command within a terminal or command window that will simply print its version number. Once the program is installed, either make sure that it can be found within your executable path or prepend the full directory path upon execution. This installed the doxygen executable into the /usr/local/bin directory on my Mac. Since I am using a Mac and do not plan to use the GUI front end, I chose an alternative approach and installed Doxygen from the command line via the Homebrew package manager using the following command. The program binaries for the latest release are about half way down the page. Please see the Doxygen downloads page for general installation instructions for your computer platform. If you need assistance with your particular setup, post a question in the comments section below and I, or someone else, can try to help you. If you are using a Linux or Windows computer, the vast majority of this tutorial should still apply, however, some minor changes may be necessary. I will be focusing on HTML in this tutorial. which makes it appealing to a wide audience. Doxygen can generate documentation in a variety of formats, e.g.

It can also include additional information based on special annotations used within the comments. The generated documentation will include summary descriptions for almost all of the elements and members defined in your program. It parses programs written in various programming languages that are annotated with certain commenting styles. Linux, macOS, Or Windows Based Computerĭoxygen is a utility that generates program documentation from source code.The resources created for this tutorial are available on GitHub for your reference. A basic understanding of Python programming is expected. This tutorial will teach you how to use the Doxygen utility to generate program documentation for your Python based project. Creating The Doxygen Configuration File.Skill Level: Intermediate Table Of Contents
