Commands¶
Help¶
Get to know all the supported command-line parameters and options by running the following command.
DPy --help

Source code analysis¶
The following command performs the most simple form of analysis. The command takes two parameters: the path of the folder containing the Python project you would like to analyze and the path of the output folder where the tool will store the generated CSV or JSON files.
DPy analyze -i <path of the input source folder> -o <path of the output folder>

Tip
Please ensure that your input source folder path specified in -i
option does not include external code such as virtual environment folder. Alternatively, you may specify the specific folders to skip in the configuration file.
You may use the following options to customize the analysis:
--format
or-f
- The output format of analysis results,json
(default) orcsv
--config
or-c
- The path to a custom configuration file. If not provided, default configuration is used--log_dir
or-l
- The directory to store log files. Defaults to the output directory, if not specified.
Source code analysis in CI pipeline¶
DPy supports analyzing Python projects in CI pipeline. The following command performs the analysis in CI mode.
DPy analyze-in-ci -repo <URL of the repository to analyze> -o <path of the output folder> -pat <personal access token> [-b <branch name; default is main>] [-k <Designite key>]
You must generate a Personal Access Token (PAT) from the repository hosting platform (such as GitHub). It is used to download the repository in a CI environment; hence, the PAT must have appropriate permission to download it.
You may also use -f
, -c
, and -l
options as described in the previous section.
Register license¶
Register a license key (optional; applicable only for Professional/Academic edition)
DPy register <lic_key>
Of course, replace <lic_key>
with the license key received from Designite.
Designite team provides a node-locked license key when you buy a license key.
If you are eligible, you may request an academic license key for free. Please refer Request an Academic License page for more details.