Getting Started
Prerequisites
To run this project, you need the following dependencies:
- Python 3.9+
If you haven't installed Python and an IDE yet, go back to the "Python 3 and IDE setup" page.
Cloning the project and installing dependencies
- Clone the git repository:
- Install required Python packages:
Running the project
From the command line
- Run the project with this command:
VS Code
- Open the virtual-mqtt-scenario directory with VS Code
- Create a file named
launch.json
in the root directory of the project. Your directory structure should look like this: - Set the contents of the
launch.json
file to this: - Press F5 to run the "Python: Launch main.py" configuration (debugger enabled)
Caution
The ${workspaceFolder}
value refers to the root directory that is currently open in VS Code. If you open a different directory (e.g. the parent directory of virtual-mqtt-scenario), there will be an error that main.py
cannot be found.
PyCharm
- In the top right corner, open the "Configurations" Listbox and click on "Edit Configurations"
- Click on the + Symbol in the top left corner to add a new configuration
- Set the "Script path" setting to the following path:
- Set the "Working Directory" setting to the following path:
- Save your changes
- Select your new configuration and run the project with Shift+F10
Building the documentation
-
Install required Python packages for MkDocs:
-
Run the MkDocs server:
Now you have a live preview of the documentation website. Saved changes to the Markdown documentation are shown immediately.