Python Stub Files for builtin Modules

Vertec Python Stub Files for use in code editors

Operating mode

Cloud Suite

|

ON-PREMISES

Modules

Services & CRM

Budget & Phases

Purchases

Resource Planning

Business Intelligence

Created: 10.12.2020
Machine translated
Updated: 28.04.2025 | Added stub files from Vertec 6.8: vtcindexing, vtcbi, vtcauth.

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

To make the Vertec Python modules available for the Type Checker, we provide Stub Files of the built-in Vertec Modulesvtcapp , vtcextensions, ziputils, vtcplanning, vtcplanningcore, reporting, vtccom, vtcindexing, vtcbi and vtcauth with.

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

Cloud Suite customers can download the Stub Files here and save them locally:

Pythonstubs.zip

You can then import them in the Code Editor.

How to do this is explained here using the Visual Studio Code example.

  1. In Visual Studio Code, install the latest version of Pylance. To do this, click Manage (gear icon) on the left and select Extension. 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, install the Python Extension.
  3. To save the Vertec Stub folder in the settings, click on Manage again on the left and select Setting.
  4. Type Python and select Extensions> Pylance. Enter the path to your Vertec Stub Files, e.g.:
  5. Then select the subdirectory in the same place on the left Python and check that as a language server Pylance is registered:
  6. Restart Visual Studio Code.

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

import vtcapp

Features of the reporting.py Stub File

From Vertec 6.6 we deliver with reporting.py also a Python Stub File for the Python code for office reports with.

This must be imported for use 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).

So that the context-Variable works, the following type annotation must be used in Python (example):

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

Netherlands

United Kingdom