Skip to content

About

Visual Studio project template for DataMiner Python scripted connectors

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Dataminer Python Script template

Visual Studio extension that distributes the Dataminer Python Script project template for adding Python scripted connectors to DataMiner connector solutions.

Generated project

The template creates a root-level project alongside QAction projects:

ScriptedConnector_1/
├── ScriptedConnector_1.pyproj
├── .gitignore
├── manifest.json
├── README.md
├── requirements.txt
├── run/
│   └── main.py
└── tests/
    ├── __init__.py
    └── test_main.py

Visual Studio generates the script and project GUIDs. The project is configured for Python 3.14, uses run\main.py as its startup file, and uses the project root as its working directory.

The generated weather example imports requests. Its requirements.txt is intentionally empty; install the package in the project-local .venv before running the example if the selected environment does not already provide it.

Repository structure

templates/DataminerPythonScript/           Editable project-template source
src/PythonScriptedConnectorScaffolder/     VSIX project
src/PythonScriptedConnectorScaffolder.Core Optional scaffolding implementation
tests/                                     Scaffolder tests
scripts/Build-ProjectTemplate.ps1          Builds the template ZIP

The VSIX consumes:

src\PythonScriptedConnectorScaffolder\ProjectTemplates\DataMinerPythonScriptedConnectorFlat.zip

The ZIP is regenerated from templates\DataminerPythonScript before the VSIX project builds.

Prerequisites

  • Visual Studio 18 Insiders with the Visual Studio extension-development and Python workloads.
  • .NET SDK 10.
  • Windows PowerShell.

Build and test

dotnet restore .\PythonScriptedConnectorScaffolder.slnx
dotnet test .\tests\PythonScriptedConnectorScaffolder.Core.Tests\PythonScriptedConnectorScaffolder.Core.Tests.csproj -c Release
dotnet build .\src\PythonScriptedConnectorScaffolder\PythonScriptedConnectorScaffolder.csproj -c Release

The distributable is generated at:

src\PythonScriptedConnectorScaffolder\bin\Release\net472\PythonScriptedConnectorScaffolder.vsix

Install

  1. Close all Visual Studio instances.
  2. Open PythonScriptedConnectorScaffolder.vsix.
  3. Select the applicable Visual Studio installation.
  4. Complete the installation and restart Visual Studio.

Use

  1. Open an existing connector solution.
  2. To group the project automatically, right-click the desired virtual Scripts solution folder.
  3. Select Add > New Project.
  4. Search for Dataminer Python Script.
  5. Name the project ScriptedConnector_<number> and keep its physical directory at the connector root.
  6. Create and select a project-local .venv.

The solution-folder placement is determined by where Add > New Project is opened. A standard Visual Studio project template cannot force a particular virtual solution folder.

The template does not modify protocol.xml; connector-specific script registration remains a separate step.

About

Visual Studio project template for DataMiner Python scripted connectors

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages