Python stub files for built-in modules

An overview of the Vertec Python stub files used in code editors

Operating mode

Cloud Suite

|

ON-PREMISES

Modules

Services & CRM

Budget & Phases

Purchases

Resource Planning

Business Intelligence

Created: 10.12.2020
Updated: 26.05.2025 | Added stub files introduced with Vertec 6.8: vtcindexing, vtcbi, vtcauth.

Many code editors, such as Visual Studio Code, have static analysis capabilities to detect errors already before execution.

To make the Vertec Python modules available for the type checker, we provide stub files with built-in Vertec modules vtcapp , vtcextensions, ziputils, vtcplanning, vtcplanningcore, reporting, vtccom, vtcindexing, vtcbi and vtcauth.

For On-Premises customers, these are stored in the PythonStubs subfolder in the Vertec installation directory.

Cloud Suite customers can download the stub files below and save them locally:

Pythonstubs.zip

You can then import them into the code editor.

Below, we explain how to do this using Visual Studio Code as an example:

  1. In Visual Studio Code, install the latest version of Pylance by clicking on Manage (gear icon) on the left and selecting Extensions. Select Pylance and click on Install. You may see a question about the default language. Answer it with Yes and reload.
  2. Python 2.7 support is required. To do this, you need to install the Python extension.
  3. To save the Vertec stub folder in the settings, click on Manage again on the left and select Settings.
  4. Type Python and select Extensions> Pylance. Enter the path to your Vertec stub files, e.g.:
  5. In the same place on the left, select the Python subdirectory and check that Pylance is entered as the language server:
  6. Restart Visual Studio Code.

The required module must be imported in the scripts, e.g. vtcapp:

import vtcapp

Key information about the reporting.py stub file

From Vertec 6.6, we deliver with reporting.py also a Python stub file for Python code for Office reports.

You must import this as usual: from reporting import *

The methods that need to be declared in the Office report code itself (e.g. def initialize_row(context, row)), are included in the stub file, but only as a documentation aid (since the method is not simply used, but has to be declared).

In order for the context variable to work, the following type annotation must be used in Python (example):

def calc_table(context):
    # type: (Context) -> Table

Netherlands

United Kingdom