Primo.Python.Core 0.1.0

dotnet add package Primo.Python.Core --version 0.1.0
                    
NuGet\Install-Package Primo.Python.Core -Version 0.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Primo.Python.Core" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Primo.Python.Core" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Primo.Python.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Primo.Python.Core --version 0.1.0
                    
#r "nuget: Primo.Python.Core, 0.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Primo.Python.Core@0.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Primo.Python.Core&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Primo.Python.Core&version=0.1.0
                    
Install as a Cake Tool

About

The Primo RPA robot uses elements of the package to interop with Python scripts

How to Use

In Primo RPA studio, create a project that will be executed by Primo RPA robot. Install this package via the ".Dependencies → Manage Dependencies" menu; the "Python" node with package elements will appear in Elements tree.

Documents

The "Python" element is a container for all other elements that are children of the "Python" node. In pure code projects use the element as follows:

//pyPath - [String] Path to the installed Python
//pyScript - Path to the script: [String] Path to the script used to interop with Python (Main.py from this Nuget-package)
//pipeName - Pipe name: [String] Name of a named pipe used to interop with Python
//bufSize - Buffer size: [Int32] Size of a named pipe buffer
Primo.Python.Inst.PythonInst pyInst = new Primo.Python.Inst.PythonInst(pyPath, pyScript, pipeName, bufSize);

Then PyInst shoud be started by

showConsole - [bool] Show console
workDir - [String] Working directory
to - [Int32] Time-out
pyInst.Start(workDir, showConsole, to);

Then we can call methods:

//To execute Python script
pyInst.Exec("print('test')");
pyInst.Exec("testvar = 'testval'");

//To get object from Python
Type st = typeof(string);
string r1 = (string)pyInst.GetObject("testvar", st);

//To load function to Python
string scrpt =
@"def test(a):    
  print(a['zzz'])
  return 'good'";
pyInst.LoadScript(scrpt);

Also these functions available as UI elements.

Key Features

  • A elements for call Python scripts
  • Supports .NET 8+

Main Types

  • Primo.Python.Inst.PythonInst

Feedback

Bug reports and contributions are welcome at Primo RPA chat

Product Compatible and additional computed target framework versions.
.NET net8.0-windows7.0 is compatible.  net9.0-windows was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0 108 1/24/2025